-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
@nativescript/background-http high number of crashes #274
Comments
Yeah just installed the package and getting the same error:
even if i explicitly call the init function in app.js |
Hi @Bernardmyburgh5 , this is not the same issue, you can bump your |
@nikoTM Thank you so much, that did fix my issue, and you are 100% right, the error is pretty descriptive, its more my knowledge of native script and native apps that is lacking. thanks for help, really appreciate it. |
@nikoTM it has to be called before the Application.start (usually hidden on none core flavours) is called this can work if you add it to the top of your app.ts/app.js/main.ts |
@triniwiz I am doing that, but I still see crashes related as seen above, so I thought it would be possible to mitigate with ensuring it was called later on, but if it needs to be called before the app is started, I guess that's not possible. I will see if I can find a workaround. |
Which flavor are you using ? |
@triniwiz typescript/angular, if I understood the question correctly. |
I am seeing a lot of crashes with
java.lang.IllegalArgumentException
when callingnet.gotev.uploadservice.UploadServiceConfig.getNamespace
Other people seem to be having this issue as well (Vydia/react-native-background-upload#288), the proposed solution is to use
net.gotev:uploadservice-okhttp:4.7.0
, whichbackground-http
already uses. There are some mentions in other threads that it might be due to not creating a notification channel which is supposed to happen hereplugins/packages/background-http/index.android.ts
Line 8 in ca9e56a
But I suspect it's not being called reliably since it's tied to application launch.
@triniwiz does it need to be strictly called on launch? Is it okay to check
didInit
when creating a session and if it hasn't initialised, try to do so?The text was updated successfully, but these errors were encountered: