Skip to content
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

Cannot read property 'toString' of null when running on android 5 #26

Closed
leocrawf opened this issue May 14, 2018 · 2 comments
Closed

Cannot read property 'toString' of null when running on android 5 #26

leocrawf opened this issue May 14, 2018 · 2 comments
Milestone

Comments

@leocrawf
Copy link
Contributor

When I use a device or emulator running android 5 I get the following exception:

An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onTouch failed

Error calling module function

Error calling module function

TypeError: Cannot read property 'toString' of null
File: "file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js, line: 178, column: 21

StackTrace:
Frame: function:'_cleanAttachmentFolder', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 178, column: 22
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 5, column: 3
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 6, column: 3
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/contact/contact-page.js', line: 10, column: 15
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'_loop_1', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 60, column: 22
Frame: function:'global.loadModule', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 68, column: 23
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 82, column: 27
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 108, column: 29
Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 213, column: 28
Frame: function:'onGoToPage', file:'file:///data/data/org.nativescript.someappname/files/app/anonlanding/anonlanding-page.js', line: 145, column: 17
Frame: function:'_executeCallback', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 283, column: 27
Frame: function:'TapAndDoubleTapGestureListenerImpl.onSingleTapUp', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 25, column: 17
Frame: function:'GesturesObserver.androidOnTouchEvent', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 229, column: 41
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 34, column: 29
Frame: function:'TouchListenerImpl.onTouch', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 33, column: 22

TypeError: Cannot read property 'toString' of null
File: ", line: 1, column: 265

StackTrace:
Frame: function:'_cleanAttachmentFolder', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 178, column: 22
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 5, column: 3
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 6, column: 3
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/contact/contact-page.js', line: 10, column: 15
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'_loop_1', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 60, column: 22
Frame: function:'global.loadModule', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 68, column: 23
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 82, column: 27
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 108, column: 29
Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 213, column: 28
Frame: function:'onGoToPage', file:'file:///data/data/org.nativescript.someappname/files/app/anonlanding/anonlanding-page.js', line: 145, column: 17
Frame: function:'_executeCallback', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 283, column: 27
Frame: function:'TapAndDoubleTapGestureListenerImpl.onSingleTapUp', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 25, column: 17
Frame: function:'GesturesObserver.androidOnTouchEvent', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 229, column: 41
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 34, column: 29
Frame: function:'TouchListenerImpl.onTouch', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 33, column: 22

TypeError: Cannot read property 'toString' of null
File: "file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js, line: 229, column: 40

StackTrace:
Frame: function:'_cleanAttachmentFolder', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 178, column: 22
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 5, column: 3
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/nativescript-email/email.js', line: 6, column: 3
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/contact/contact-page.js', line: 10, column: 15
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'_loop_1', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 60, column: 22
Frame: function:'global.loadModule', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 68, column: 23
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 82, column: 27
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 108, column: 29
Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 213, column: 28
Frame: function:'onGoToPage', file:'file:///data/data/org.nativescript.someappname/files/app/anonlanding/anonlanding-page.js', line: 145, column: 17
Frame: function:'_executeCallback', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 283, column: 27
Frame: function:'TapAndDoubleTapGestureListenerImpl.onSingleTapUp', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 25, column: 17
Frame: function:'GesturesObserver.androidOnTouchEvent', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 229, column: 41
Frame: function:'', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 34, column: 29
Frame: function:'TouchListenerImpl.onTouch', file:'file:///data/data/org.nativescript.someappname/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 33, column: 22

at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
at com.tns.Runtime.callJSMethod(Runtime.java:957)
at com.tns.Runtime.callJSMethod(Runtime.java:941)
at com.tns.Runtime.callJSMethod(Runtime.java:933)
at com.tns.gen.java.lang.Object_frnal_ts_helpers_l58_c38__TouchListenerImpl.onTouch(Object_frnal_ts_helpers_l58_c38__TouchListenerImpl.java:13)
at android.view.View.dispatchTouchEvent(View.java:8465)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2399)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2092)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2369)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1719)
at android.app.Activity.dispatchTouchEvent(Activity.java:2742)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2330)
at android.view.View.dispatchPointerEvent(View.java:8666)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4123)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3989)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3680)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3737)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5807)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5781)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5752)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5897)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
leocrawf added a commit to leocrawf/nativescript-email that referenced this issue May 14, 2018
@leocrawf
Copy link
Contributor Author

I fixed the issue: leocrawf@d3ec6ff

EddyVerbruggen added a commit that referenced this issue May 14, 2018
Fix for #26: not all devices have an external cache dir
@EddyVerbruggen
Copy link
Owner

@leocrawf Thanks, I created a PR from your fork and merged it 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants