Throwing Error in JavaScript file causes unhandled exception in Log with Jackson parser
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- mobile-dev, testing
Research direction
Start with the TestDebugReporter path named in the stack trace and inspect how CommandDebugWrapper metadata is parsed by Jackson when a JavaScript Error is present. Reproduce with a script containing throw new Error("message"), then verify the log displays that message instead of the Jackson unhandled-exception output.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues and didn't find mine.
Steps to reproduce
- Create JS file that will perform some action.
- Add
throw new Error("message")command. - Error might be the single action in the JavaScript file to simplify reproducing
- Call this JS file from a test
On failure, the maestro log with have Jackson parser exception.
So, there is no error message from the Error that will help to understand why the test failed, just a useless unhandled exception.
Actual results
Unhandled exception in Jackson parser
Expected results
The message from error is displayed in the log file
About app
Any natove mobile app. Failure may happen before starting the app, if my script is creating test data before the test.
About environment
macOS 14.6.1
java 17.0.11 2024-04-16 LTS
Logs
Logs
[ERROR] maestro.cli.report.TestDebugReporter - Unable to parse commands
com.fasterxml.jackson.databind.JsonMappingException: org.mozilla.javascript.NativeObject cannot be cast to org.mozilla.javascript.NativeError (through reference chain: java.util.ArrayList[2]->maestro.cli.report.CommandDebugWrapper["metadata"]->maestro.cli.report.CommandDebugMetadata["error"]->org.mozilla.javascript.JavaScriptException["value"]->org.mozilla.javascript.NativeError["prototype"]->org.mozilla.javascript.NativeError["stackDelegated"])
Maestro version
14.6.1
How did you install Maestro?
Homebrew
Anything else?
No response
- Dominant language
- Kotlin
- Stars
- 15.7k
- Forks
- 953
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 32
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mobile-dev-inc/Maestro
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
mobile-dev-inc/Maestro#3607 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mobile-dev-inc/Maestro#3051 · 2 comments · 1 reaction ·
-
platform: web
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mobile-dev-inc/Maestro#3049 · 1 comment ·
-
iOS systems permission helper only dismisses pop ups for English language simulator configurations Openplatform: ios
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mobile-dev-inc/Maestro#2654 · 2 comments · 2 reactions ·
-
platform: ios
Difficulty 3/5 1-2 days Newbie friendliness 78/100
mobile-dev-inc/Maestro#3614 · 1 comment ·
All issues in mobile-dev-inc/Maestro
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Good First Issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ankidroid/Anki-Android#21942 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
libre-tube/LibreTube#8781 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MetrolistGroup/Metrolist#4396 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100