Not working on Android 8.1.0 Pixel 2 XL with plugin version 3.2.3
See original GitHub issueWhich platform(s) does your issue occur on?
- Android
- 8.1.0
- Pixel 2 XL
Please, provide the following version numbers that your issue occurs with:
- CLI: 3.4.2
- Cross-platform modules: 3.4.1
- Runtime(s): 3.4.2
- Plugin(s):
"devDependencies": {
"@angular/compiler-cli": "~5.2.0",
"@ngtools/webpack": "~1.9.4",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "~4.0.2",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "1.5.0",
"nativescript-dev-typescript": "~0.6.0",
"nativescript-dev-webpack": "~0.9.1",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.2.1",
"sass-loader": "~6.0.6",
"tslint": "~5.8.0",
"typescript": "~2.6.2",
"uglifyjs-webpack-plugin": "~1.1.6",
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0"
}
Please, tell us how to recreate the issue in as much detail as possible.
When attempting upload I get the following error.
{"eventName":"error","object":{"_observers":{"progress":[{}],"error":[{}],"complete":[{}]},"_session":{"_id":"image-upload"},"_id":"image-upload{1}","_description":"{ 'uploading': IMG-20180421-WA0003.jpg }","_upload":0,"_totalUpload":1,"_status":"error"}}
This must be related to issue https://github.com/NativeScript/nativescript-background-http/issues/124, but the 3.2.3 release does not fix it for me.
I can get it working by applying the fix as described here, https://github.com/NativeScript/nativescript-background-http/issues/124#issuecomment-377788306.
I’ve tried removing the node_modules
and reinstalling. I’ve tried removing tns platform remove android
and reinstalling. Does not help.
Copy pasting the code from that comment into background-http.android.js
works.
If I replace:
var displayNotificationProgress = typeof options.androidDisplayNotificationProgress === "boolean" ? options.androidDisplayNotificationProgress : true;
if (displayNotificationProgress) {
request.setNotificationConfig(new net.gotev.uploadservice.UploadNotificationConfig());
}
with
const displayNotificationProgress = typeof options.androidDisplayNotificationProgress === "boolean" ? options.androidDisplayNotificationProgress : true;
if (displayNotificationProgress) {
const channel = new android.app.NotificationChannel(application.android.packageName, application.android.packageName,
android.app.NotificationManager.IMPORTANCE_LOW);
const notificationManager = context.getSystemService(android.content.Context.NOTIFICATION_SERVICE)
notificationManager.createNotificationChannel(channel);
const uploadNotificationConfig = new net.gotev.uploadservice.UploadNotificationConfig();
uploadNotificationConfig.setNotificationChannelId(application.android.packageName)
request.setNotificationConfig(uploadNotificationConfig);
}
on lines 128 and 181 than it works.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Fix an installed app that isn't working on a Pixel phone
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >TWRP 3.2.3-1 for Pixel 2 XL | Page 160 | XDA Forums
I have a Taimen on VZ and have not had any problems booting and installing latest TWRP. You may have a bad dl...
Read more >Android 8.1.0 Oreo MR1 Released - Google Groups
android -8.1.0_r1 cannot pass my build. It seems the native.git has openmax header relocated to frameworks/native/headers/media_plugin/media/openmax. But other ...
Read more >Pixel 2 and Pixel 2 XL: 13 Common Problems, and How to Fix ...
You could try uninstalling apps one by one and testing again or you could factory reset and reinstall selectively. If you do decide...
Read more >(RHSA-2018:0496) Important: kernel security and bug fix update
(BZ#1538587) The Return Trampoline (Retpoline) mechanism mitigates the branch target injection, also known as the Spectre variant 2 vulnerability.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am having this issue as well… nativescript-angular with background-http at 3.2.5 on sdk 26+ Going to give this fix a try.
Thanks @pauly815 / @FranciZ
Edit, for the record, this fixes things for me!
I’m observing the same issue as FranciZ on 3.2.5. I’m running TNS 3.4.2 on a Samsung S8 emulator with Android 8.0. Only thing that worked for me was the fix from issue #124.