NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
102 stars 50 forks source link

Android Error #95

Closed LorenDorez closed 6 years ago

LorenDorez commented 6 years ago

Whever i try to use the plugin i get an error

Successfully synced application org.nativescript.PatrolmanMobileApp on device emulator-5554.
ActivityManager: Start proc 3931:org.nativescript.PatrolmanMobileApp/u0a178 for activity org.nativescript.PatrolmanMobileApp/com.tns.NativeScriptActivity
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
System.err:
System.err: Error calling module function
System.err:
System.err: Error calling module function
System.err:
System.err: Error calling module function
System.err:
System.err: TypeError: Cannot read property 'extend' of undefined
System.err: File: "file:///data/data/org.nativescript.PatrolmanMobileApp/files/app/tns_modules/nativescript-background-http/background-http.js, line: 7, column: 77
System.err:
System.err: StackTrace:
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.PatrolmanMobileApp/files/app/tns_modules/nativescript-background-http/background-http.js', line: 7, column: 78
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.PatrolmanMobileApp/files/app/shared/api.js', line: 1, column: 76
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.PatrolmanMobileApp/files/app/app.js', line: 13, column: 14
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: TypeError: Cannot read property 'extend' of undefined
System.err: File: "<unknown>, line: 1, column: 265
System.err:
System.err: StackTrace:
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.PatrolmanMobileApp/files/app/tns_modules/nativescript-background-http/background-http.js', line: 7, column: 78
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.PatrolmanMobileApp/files/app/shared/api.js', line: 1, column: 76
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/org.nativescript.PatrolmanMobileApp/files/app/app.js', line: 13, column: 14
System.err:     Frame: function:'require', file:'', line: 1, column: 266
tsonevn commented 6 years ago

Hi @LorenDorez, I tested your case on a newly created sample project, however, was unable to recreate the same behavior. For your convenience I am attaching sample project, please review it and make the needed changes, which will allow us to recreate the issue. Also, it would help if you could provide some more info about your environment(CLI node, npm versions)

Archive.zip

LorenDorez commented 6 years ago

@tsonevn it appears to be a cache issue. i ran TNS build android a few times and now its working.