Skip to content

Android: undefined function error inside async function crash whole app #14389

Description

@Informate

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

The crash ONLY happen when the new rejection handler redirector feature pull request is applied!

When an undefined function is called inside an asyncronous function the error is reported and then the app crashes.

[ERROR] V8Util: Uncaught ReferenceError: zippy is not defined
[ERROR] V8Util: /app.js @ 2 >>> zippy();
[ERROR] TiExceptionHandler: (main) [247,247] /app.js:2
[ERROR] TiExceptionHandler: zippy();
[ERROR] TiExceptionHandler: ^
[ERROR] TiExceptionHandler: ReferenceError: zippy is not defined
[ERROR] TiExceptionHandler: at basic (/app.js:2:1)
[ERROR] TiExceptionHandler: at /app.js:4:17
[ERROR] TiExceptionHandler: at /app.js:4:25
[ERROR] TiExceptionHandler: at Module._runScript (ti:/kroll.js:1196:15)
[ERROR] TiExceptionHandler: at Module.load (ti:/kroll.js:734:13)
[ERROR] TiExceptionHandler: at Module.loadJavascriptText (ti:/kroll.js:1062:15)
[ERROR] TiExceptionHandler: at Module.loadAsFile (ti:/kroll.js:1108:22)
[ERROR] TiExceptionHandler: at Module.loadAsFileOrDirectory (ti:/kroll.js:1039:26)
[ERROR] TiExceptionHandler: at Module.require (ti:/kroll.js:865:30)
[ERROR] TiExceptionHandler: at Module.global.Module.require (:4405:32)
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:172)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiApplication.launch(TiApplication.java:850)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:96)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:508)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:177)
[ERROR] TiExceptionHandler: org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:527)
[ERROR] TiExceptionHandler: android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
[ERROR] TiExceptionHandler: android.app.Activity.performResume(Activity.java:8353)
[ERROR] TiExceptionHandler: android.app.ActivityThread.performResumeActivity(ActivityThread.java:4908)

Expected Behavior

App do not crashes

Actual behavior

App crashes

Reproducible sample

async function basic() {
zippy();
}
(async ()=>await basic())();

Steps to reproduce

Run the app.js

Platform

Android

SDK version you are using

#14182

Alloy version you are using

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triageThis issue hasn't been reviewed by maintainers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions