-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crashes while uploading image - android.app.RemoveServiceException: can't deliver broadcast #89
Comments
@neddinn I was able to fully reproduce the issue and it seems related to nativescript-background-http and the way it broadcasts large data - it also appears only on devices running Android 7.1+. Moving this issue to nativescript-background-http repository. Steps to reproduce: - use this sample application on a device with Android 7.1 or greater (reproducible on Nexus 5x a.k.a. bullhead) Error received:
|
Issue traced back to the android-upload-service library used in the plugin. It happens because the test service https://httpbin.com/post responds with the contents of the uploaded file. If the contents are big enough, the native library will produce an exception. To avoid this, please use another testing service that does not return the uploaded file in the response. An issue has been logged in the native library repo - gotev/android-upload-service#342 |
@lini Not so sure this is the issue. I am trying to upload files to Amazon S3 (which doesnt return the contents of the uploaded file), and I still encounter this error. |
I get this too and I am not using httpbin. The service I upload to, just returns a lil bit of JSON... |
Hi, |
@lini I ended up getting past this issue by setting the large heap flag in the android manifest.
|
Thanks for the provided solution. I am closing this issue, feel free to reopen if the problem persists. |
Getting this issue even set the android:largeHeap="true" |
I solved this issue by move some logic outside the onComplete() function. My working code:
|
From @neddinn on November 28, 2017 7:32
Tell us about the problem
The app crashes when trying to upload an image.
Error:
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
I'm using nativescript-background-http v3.0.0 & tns-core-modules v3.3.0
Please tell us how to recreate the issue in as much detail as possible.
This error is quite erratic but it mostly doesn't work, after taking a photo using camera plugin and saving or even selecting an image from the gallery, when I try to upload, it crashes the application and throws the aforementioned error.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Copied from original issue: NativeScript/NativeScript#5098
The text was updated successfully, but these errors were encountered: