Saturday, April 7, 2012

AppFlower + VirtualBox + Win7: The Adventure Begins

As noted in my last post, I'm trying to get an AppFlower development environment running.  My latest attempt is on my home PC (AMD-64 quad-core CPU), in a Windows 7 partition with lots of disk space.  AppFlower provided a preconfigured virtual machine that should work inside Oracle's VirtualBox. The VM file is a 1 GB download that inflates to 4 GB when unzipped, but it represents a 20 GB virtual disk drive (and thus may grow).

Installation is carefully documented, with both step-by-step text instructions and a short video.  Unfortunately, the video and the text do not always agree, and apparently sometimes both are wrong. If my tests of AppFlower convince me it fits our project needs, I'll be repeating this installation process, so I'd better document the issues here.
  • The written instructions warn Windows users to enable IO APIC. The video instructions (perhaps not for Windows users?) omit this. It seems to be important, at least on Win 7.
  • In the video, when playing with the VM's settings, the demonstrator explicitly disables the boot from USB and boot from CD options, so that boot from hard drive is the only choice. The written instructions are silent about this. I suspect it makes no difference, but better safe than sorry, so I followed the video.
  • The video uses host-only networking of the VM, while the written instructions suggest bridged network first, NAT as a fall-back. Something I found in a response to a support question suggested that AppFlower Studio may go off on the Internet and download something when you create a new project. I suspect that cannot happen with host-only, although I'm not positive. On the other hand, I'm unable to connect my browser to the VM if it uses NAT.  (I can connect with both host-only and bridged.) So bridged wins.
  • Neither the video (at least not that I noticed) nor the text instructions says anything about turning off audio support in the VM settings. So I didn't (at first), and got warning messages while booting the VM. The warnings are harmless, but I think it best to turn off audio anyway.
  • After installing and signing in, you're greeted by a splash screen. The documentation shows four quick link buttons, the first two of which can be used to create a new project or open an existing project. I see neither of those on my splash screen, just the last two buttons. Fortunately, equivalent functionality is available from the Studio BETA button in the top left after you get past the splash screen.
  • The instructions to create a project show six steps. In fact, AppFlower Studio only lists four steps (steps 1, 3, 4 and 6 of the five shown, which are numbered 1-2-3-4 in the Studio beta). The disk location is automatically selected (a somewhat cryptically named directory is created on the VM), and the database is set up using a rather funky database name and automatically generated credentials. It will be interesting to see how hard it is, if we get to the point of deploying an application, to change the database settings.
Now the critical part. After sorting out all settings stuff above, and logging into the Studio, I attempted to create a new project named CRM (following the  "Practical AppFlower" tutorial). Again, the tutorial shows six steps to create the project whereas the software actually only has four. The last step is passive; click Save Project and Studio sets everything up for you, including the virtual host. Except it didn't. Instead, I got a somewhat less than helpful message that the project was not created because an error occurred (with no indication what the error was).

Time for some serious groping in the dark. AppFlower Studio includes (in the Tools menu) an easy way to open a console. The console, sadly, contained no error messages. Within the console, certain special commands can be run. Two of those are documented in the section labeled "AppFlower Studio Tasks - afs". I tried the first (afs fix-perms) thinking that perhaps Studio was unable to create the project directory due to munged disk permissions. It did not appear to help: the same nonspecific error message occurred when I tried to create the CRM project. So I tried the second (afs insert-diff-sql). It reported that it found no differences, but after running it project creation worked. If I have to go through this again, it's probably a good idea to run both commands. The first is at worst harmless, and it's possible that both were required to fix whatever was going wrong.

After creating the project, I was given a new port number. Pointing the browser at that port (on the same IP address that I using for the VM) opens the new project. Interestingly, the Studio BETA button in the new project has no option to create another project, nor to open other projects. The Studio BETA button in the "playground" (the instance I already had open) has both a create menu item and a recent projects menu item. (The new project did not appear under "recent projects" until I logged out and back in. I also changed the project name, in its settings dialog, before logging out of the playground and back in. I don't know if some tweak like that is necessary to make the playground take notice of the project.)

The next step is to complete the CRM tutorial and see if everything works.


  1. HI Paul,
    I came accross your posts. I am interested to see how it go for your .. Is the Appflower studion any good? Is it usable or still in beta ? Please keep us posted with your progress with AppFlower (I am giving up on XAMPP now too - too flakey for me... not fancying the Virtual MAchine route. Trying to figure out how tio setup the studio on hosted environment, so the developers could connect from anywhere... not much success though...)

    1. Pavol: I ended up abandoning AppFlower. I think it's still beta, but it's a fairly usable beta, at least for simple projects. The main reason I bailed out was not that we needed to do things with junction tables and differing views of the same table for different users that would have required directly coding in Symfony. Our in-house developers mainly use C# on the DotNet platform, so mucking around with Symfony and expecting them to support whatever I did was asking a bit much.

      There's one more post about AppFlower ( and I'm afraid that's it. I made it through the tutorial with my sanity intact, if that's any help.

      Good luck getting it set up for remote access by developers. Perhaps the thing to do is to set it up in a VM, look at the virtual drive to see what's where, copy the configuration files from the VM, then try setting it up on a Linux host with those config files (edited as needed)?



Due to intermittent spamming, comments are being moderated. If this is your first time commenting on the blog, please read the Ground Rules for Comments. In particular, if you want to ask an operations research-related question not relevant to this post, consider asking it on Operations Research Stack Exchange.