Permission Denied (file not found) Error

8 posts, 0 answers
  1. Courtney
    Courtney avatar
    13 posts
    Member since:
    Apr 2007

    Posted 09 Jun 2012 Link to this post

    When I try to run my app "Hunt1" directly on my device (Motorola Droid Bionic), I get the following error on my phone as the app tries to start up:

    Application Error
    The requested file was not found./mnt/sdcard/Icenium/com.telerik.Hunt1/index.html (Permission denied)(file:///mnt/sdcard/Icenium/com.telerik.com.Hunt1/index.html)

    I also get the same error when I am using Mist.

    However, when I use Mist, and then transfer and run the file manually on my phone, the app works file.

    Any ideas?

    Courtney
  2. Evgeni
    Evgeni avatar
    21 posts
    Member since:
    Jun 2012

    Posted 09 Jun 2012 Link to this post

    Hello Courtney,

    Thank you for trying out our product.

    What we do with Android is save the project files on the sdcard so we can easily modify them from Graphite/Mist.
    This happened to me when I had my sdcard attached as an external drive. Would you try disconnecting it? 

    Evgeni

  3. Courtney
    Courtney avatar
    13 posts
    Member since:
    Apr 2007

    Posted 09 Jun 2012 Link to this post

    Hi Evgeni, thanks for the quick response.

    I was not entirely sure what you wanted me to "disconnect".  

    I did notice in the windows 7 task bar that the phone was connected as both a drive G and a drive H so I disconnected both of those drives.  I then made a change to my code and selected Run on Device.  I immediately got the Permission denied when the app tried to run on the phone.  

    I then removed the USB cable from my phone and Icenium detected the device was no longer connected

    I then plugged my USB cable back into the phone.  On the phone it said "Connecting USB for USB mass storage" and Icenium detected the phone was plugged in again.

    I then selected Run on Device on Icenium and the program ran on my phone! :)

    I then made a single letter code change on an html page of my code and selected Run On Device and I got the Permission Denied error again. :(

    Unfortunately I have not been able to completely reproduce these steps every time.  Sometimes they work and I can run my code once on my phone and sometimes they don't work.  

    The biggest issue is, no matter what I do, once I get Icenium to work ONE TIME and run my code on my phone, the second time always fails with the permission denied error.  Then some combination of disconnecting the windows USB drives and removing and reconnecting my USB cable to my phone gets Icenium to work ONCE only.

    Manually building and copying the apk file from my windows machine to my phone works but it is a slow tedious process when coding/debugging.  It also seems that in order for the manual copy to work I have to uninstall the previous copy before the new copy will work.

    Courtney
  4. Yavor
    Yavor avatar
    25 posts
    Member since:
    May 2009

    Posted 10 Jun 2012 Link to this post

    Hi Courtney,

    You need to set up your device to appear as a USB debugging target, rather than a USB Mass Storage device. We have an article on this in our docs, but if it doesn't work out for you - feel free to ping us any time and we'll be glad to help.

    Also, Graphite automatically deploys changes to your app on the device - just click save and the modified file will be transmitted over the cable and the app will be refreshed. It's a lot faster than always building a new APK and installing it. Actually, if you click Run On Device after your app is deployed, Graphite will save any unsaved files and transmit the changes, instead of rebuilding from scratch.
  5. Courtney
    Courtney avatar
    13 posts
    Member since:
    Apr 2007

    Posted 15 Jun 2012 Link to this post

    I did follow your docs on setting up my phone and I have gotten Graphite to successfully recognize the device and it will deploy the code to my device when I select Save or Run On Device.  However after the first run or save on my device, any subsequent attempts to run on the phone results in the Permissions Denied error. 

    I have attached two PNG files to show that the drivers are installed (and recognized from adb and from Graphite).

    FYI on my Motorola Bionic phone under Settings -> Application -> Development I have the "USB Debugging" option checked.

    One setting I am unsure about is when I plug in the USB cable into my phone a "USB Connection" manager application runs.  This application allows me to pick one of four USB connection settings:
         PC Mode
         Windows Media Sync
         USB Mass Storage
         Charge Only
    When I select PC Mode, Graphite no longer recognized my phone as an external device
    Graphite does detect my phone when I select "USB Mass Store" but you suggested I should not have this option checked.

    Which of these phone USB Connection settings should I have selected?

    Thanks

    Courtney
  6. Yavor
    Yavor avatar
    25 posts
    Member since:
    May 2009

    Posted 16 Jun 2012 Link to this post

    Hi Courtney,

    You should choose the Charge Only option - USB Mass Storage unmounts the SD card from Android so that your computer can mount it. The missing SD card doesn't prevent Icenium from detecting your device, but deployment and Live Sync rely on its availability.

    Please let me know if this has resolved your issue.

    Regards,
    Yavor
  7. Courtney
    Courtney avatar
    13 posts
    Member since:
    Apr 2007

    Posted 20 Jun 2012 Link to this post

    Yavor,

    Thanks, so far switching my phone's USB settings to "Charge Only" seems to allow me to "run on Device" from Icenium multiple times in a row without getting that Permission issue.   I have not had much time to fully test it but so far so good.  I will let you know if anything pops up regarding this issue.

    Courtney
  8. Benjamin
    Benjamin avatar
    4 posts
    Member since:
    Apr 2013

    Posted 09 Apr 2013 Link to this post

    I had the same problem.

    What's going on is that your phone is conflicted on HOW it is to talk you your computer.  If it is communicating as a storage device then it gets confused when you want to run an app.  You have to tell it that you do NOT want to use it as a storage device and you are only interested in charging it.

    I have a Droid 3 from Motorola - here's how I did it:
    http://support.verizonwireless.com/clc/devices/knowledge_base.html?id=45110

    Cheers!

Back to Top