This is a migrated thread and some comments may be shown as answers.

Permission Denied (file not found) Error

7 Answers 42 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Courtney
Top achievements
Rank 1
Courtney asked on 09 Jun 2012, 06:36 AM
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

7 Answers, 1 is accepted

Sort by
0
Evgeni
Top achievements
Rank 1
answered on 09 Jun 2012, 08:26 AM
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

0
Courtney
Top achievements
Rank 1
answered on 10 Jun 2012, 04:51 AM
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
0
Yavor
Top achievements
Rank 1
answered on 10 Jun 2012, 12:35 PM
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.
0
Courtney
Top achievements
Rank 1
answered on 15 Jun 2012, 07:02 PM
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
0
Yavor
Top achievements
Rank 1
answered on 16 Jun 2012, 03:12 PM
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
0
Courtney
Top achievements
Rank 1
answered on 20 Jun 2012, 05:43 PM
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
0
Benjamin
Top achievements
Rank 1
answered on 09 Apr 2013, 08:23 PM
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!

Tags
AppBuilder Windows client
Asked by
Courtney
Top achievements
Rank 1
Answers by
Evgeni
Top achievements
Rank 1
Courtney
Top achievements
Rank 1
Yavor
Top achievements
Rank 1
Benjamin
Top achievements
Rank 1
Share this question
or