2017년 4월 27일 목요일

Web got.file on device give error 1101 but in emulator work good


I try to download a file with the block web Got.file and when i try tthe code with Companion on my phoe it work good, when i build the apk and i try to download it i receive the error message 1101.
I think it's a problem of App Inventor Building cose i have try to do a new app just with a button for download a file and i receive the same error 1101, just building the apk, on companion it work...
The same code in the same app work when i have try it with AI1 worked good.
Sorry for my bad english, but i really need some help...
(the code is the same of this tutorial page: http://puravidaapps.com/filedownload.php)
thank you for your helps.

--
does the example work for you without modifications?
you can download it here Download aia file for App Inventor 2

--
I have the same problem, when web Got File startet he say cant find file i recive error message 1101.
And i added new screen in existing app and when i start him he crash but work fine under emulator

--
@Vedran: It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

--
i have dowloaded your .aia file, i have loaded it in my AI2 and i have build the app...
Same problem, Ai2 give me error 1101...
Now i think is a issue of App Inventor builder...
This aia file work in your devices?

--
I just tested the example successfully
probably an issue with your internet connection?
--
sorry but have you tested it with an emulator or on a device with the apk? Cose on AI2 connected with Ai Companion at my phone it work, just when i build the apk and i install it on my device it don't work, and the connection is the same.. For try it i have try to connect me to a friend's wifi and with my 3g phone connection too... Nothing, i have the same problem.. (error 1101)
Would you try to reload your aia file in AI2 and (re)build the apk and test it on a device please?
Thank you for your attention.

--
you are right, downloading a file using the web component doesn't work anymore after building the app.

logcat output 

I also tried to download an image from my own web server, this also failed! 

@MIT: please find an example project attached. Just build it and run the apk file, then click the get button and the error 1101 appears. Thank you.
--
Thank you Taifun for your help

--
Thanks.  Any idea when this started happening?

--
I just built the example on the extension test server and it works fine, which means, it's another V145 issue... 

--
I'm looking into this now...

--
I have found and fixed this bug. It should be in tomorrow's release.

The problem was caused by our updating minSdk from 3 to 4. The Web component writes to external storage (aka the sdcard) which requires READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE. However it didn't have those permissions. It used to work because those permissions were introduced with API 4. So when we set minSdk to 3, they were implicitly granted. But when we updating things to minSdk of 4, things broke.

The Companion worked because it has those permissions because they were added to the File component at some point and the Companion has all components built in so it gets all the permissions.

--
We just deployed release nb145b which fixes this issue.

--
Yes now it work, thank you so much for your helps.
--

댓글 1개:

  1. Hi: exactly the same problem occurs when I use an other app of my phone, the APK is work fine and I use v.g. Calc then the App Calc is first plane(or fisrst service) and my APK go to second plane(or second service), then a timer activate the web.GotFile or Web.GotText and appear a message "Error 1101: Unable to get a response eith the specified URL:...."

    To try to solve this issue, I delete the block "Call.web1.Get" and obviously not appear error, but I replace this with a sound. I start newly the APK and the App Calc on Fisrt Service (APK go to second service), and the APK WORK FINE, the sound is activate with the timer and the beep sound in second Service, even when the screen of my phone is off.

    I try other steps but I think I know what the error is.
    The Error 1101 appear "not connection". Then, when the APK go to second Service and I have Internet connection, then the APK DOES NOT ACTIVATE the CONNECTION TO THE INTERNET, the APK DISABLE the CONNECTION, then the request of the block "call web1.get" launch the message Error 1101.

    TAIFUN, Can you repair or fix this small detail but strongly necessary for the APK to work in the Second Service ?.

    Thank you very much.

    답글삭제