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

Crash on start recording #15

Open
hf-yevhen opened this issue Jun 4, 2021 · 21 comments
Open

Crash on start recording #15

hf-yevhen opened this issue Jun 4, 2021 · 21 comments
Labels
bug Something isn't working

Comments

@hf-yevhen
Copy link

Describe the Bug
The app crashes on start recording

To Reproduce
run command:
detox recorder --configuration iosDebug --simulatorId booted --outputTestFile "~/Desktop/RecordedTest.js" --testName "My Recorded Test" --record

.detoxrc.json config:

...
"iosDebug": {
      "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/myapp.app",
        "build": "xcodebuild -workspace ios/myapp.xcworkspace -scheme myapp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES",
        "type": "ios.simulator",
        "name": "iPhone 11",
        "device": {
          "type": "iPhone 11"
        }
    }
    ...

Expected Behavior
Expect to launch and start recording

Actual Behavior
The app crashes on boot

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • macOS: [e.g. 11.3.1]
  • Xcode: [e.g. 12.5]
  • iOS Simulator Runtime: [e.g. iOS 14.5]
  • Detox Recorder Version: [e.g. 1.0.151]

Logs
Post here the output of

log stream --level debug --style compact --predicate "subsystem=='DetoxRecorder'"
Timestamp        Ty Process[PID:TID]
2021-06-04 11:56:06.022 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Parsing arguments
2021-06-04 11:56:06.024 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /bin/bash with arguments: [“-l”, “-c”, “which applesimutils”] environment: [:]
2021-06-04 11:56:06.260 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /usr/local/bin/applesimutils with arguments: [“--list”, “--booted”] environment: [:]
2021-06-04 11:56:06.418 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Attempting to discover Detox config file
2021-06-04 11:56:06.420 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Using “.detoxrc.json” config file
2021-06-04 11:56:06.420 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /bin/bash with arguments: [“-l”, “-c”, “which xcrun”] environment: [:]
2021-06-04 11:56:06.655 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /usr/bin/xcrun with arguments: [“simctl”, “install”, “C15FAC68-9112-43EE-B348-2620BD751F05", “ios/build/Build/Products/Debug-iphonesimulator/myapp.app”] environment: [:]
2021-06-04 11:56:08.794 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /usr/bin/xcrun with arguments: [“simctl”, “get_app_container”, “C15FAC68-9112-43EE-B348-2620BD751F05", “com.myapp”] environment: [:]
2021-06-04 11:56:10.934 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /usr/bin/nm with arguments: [“-U”, “/Users/user/Library/Developer/CoreSimulator/Devices/C15FAC68-9112-43EE-B348-2620BD751F05/data/Containers/Bundle/Application/964B24D1-CF54-428E-B967-A9EB7A77506B/myapp.app/myapp”] environment: [:]
2021-06-04 11:56:11.493 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /usr/bin/otool with arguments: [“-L”, “/Users/user/Library/Developer/CoreSimulator/Devices/C15FAC68-9112-43EE-B348-2620BD751F05/data/Containers/Bundle/Application/964B24D1-CF54-428E-B967-A9EB7A77506B/myapp.app/myapp”] environment: [:]
2021-06-04 11:56:11.665 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] App binary requires framework injection: true
2021-06-04 11:56:11.665 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /usr/bin/xcrun with arguments: [“simctl”, “terminate”, “C15FAC68-9112-43EE-B348-2620BD751F05", “com.myapp”] environment: [:]
2021-06-04 11:56:12.611 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Published recording service: <NSNetService 0x7fc743511220> local. _detoxrecorder._tcp. AF8861DE-777E-4707-A885-76029DA4BB6A 49299
2021-06-04 11:56:12.612 I DetoxRecorderCLI[77479:914c6] [DetoxRecorder:CLI] Launching /usr/bin/xcrun with arguments: [“simctl”, “launch”, “C15FAC68-9112-43EE-B348-2620BD751F05", “com.myapp”, “-DTXRecStartRecording”, “1”, “-DTXRecTestName”, “My Recorded Test”, “-DTXServiceName”, “AF8861DE-777E-4707-A885-76029DA4BB6A”] environment: [“SIMCTL_CHILD_DYLD_INSERT_LIBRARIES”: “/Users/user/Desktop/hotfin/mobile-app/node_modules/detox-recorder/DetoxRecorder.framework/DetoxRecorder”]

in addition to any other output you get from the command line.

Additional Context
Crash log from Flipper:

Process:               myapp [77831]
Path:                  /Users/USER/Library/Developer/CoreSimulator/Devices/C15FAC68-9112-43EE-B348-2620BD751F05/data/Containers/Bundle/Application/964B24D1-CF54-428E-B967-A9EB7A77506B/myapp.app/myapp
Identifier:            myapp
Version:               1.402 (8)
Code Type:             X86-64 (Native)
Parent Process:        launchd_sim [40687]
Responsible:           SimulatorTrampoline [33093]
User ID:               501
Date/Time:             2021-06-04 11:56:12.851 +0300
OS Version:            macOS 11.3.1 (20E241)
Report Version:        12
Bridge OS Version:     5.4 (18P4663)
Anonymous UUID:        4B818C85-D8F7-B25B-A082-F50DB7156E2A
Sleep/Wake UUID:       71BFA821-933A-43E5-B7C1-D574A8AFB2C1
Time Awake Since Boot: 26000 seconds
Time Since Wake:       9500 seconds
System Integrity Protection: enabled
Crashed Thread:        0
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY
Termination Reason:    DYLD, [0x9] <unknown>
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/user/Library/Developer/CoreSimulator/Caches/dyld/20E241/com.apple.CoreSimulator.SimRuntime.iOS-14-5.18E182
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_INSERT_LIBRARIES=/Users/user/Desktop/hotfin/mobile-app/node_modules/detox-recorder/DetoxRecorder.framework/DetoxRecorder
DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks
DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib
Dyld Error Message:
  could not load inserted library ‘/Users/user/Desktop/hotfin/mobile-app/node_modules/detox-recorder/DetoxRecorder.framework/DetoxRecorder’ because no suitable image found.  Did find:
	/Users/user/Desktop/hotfin/mobile-app/node_modules/detox-recorder/DetoxRecorder.framework/DetoxRecorder: open() failed with errno=1
Binary Images:
       0x108955000 -        0x10a0e8fff +com.myapp (1.402 - 8) <18FB1DB6-7905-3A47-8AE0-45AB3048F9D5> /Users/USER/Library/Developer/CoreSimulator/Devices/C15FAC68-9112-43EE-B348-2620BD751F05/data/Containers/Bundle/Application/964B24D1-CF54-428E-B967-A9EB7A77506B/myapp.app/myapp
       0x10d155000 -        0x10d1aefff +dyld_sim (851.28) <2A92FC99-72A9-38ED-8DDD-AF4C25080124> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
       0x1181da000 -        0x118275fff  dyld (851.27) <7EAA668B-F906-3BAA-A980-139BBE6E8766> /usr/lib/dyld
@hf-yevhen hf-yevhen added the bug Something isn't working label Jun 4, 2021
@vagnerlandio
Copy link

Same problem here.

Logs freezing on:

2021-10-25 00:02:13.894 I  DetoxRecorderCLI[37423:40b99] [DetoxRecorder:CLI] Launching /usr/bin/xcrun with arguments: ["simctl", "launch", "CFBCE1C6-D83E-4E8E-9B48-731A1C125D8F", "com.example.app", "-DTXRecStartRecording", "1", "-DTXRecTestName", "My Recorded Test", "-DTXServiceName", "72FAAEB1-F7CA-445A-822E-0903FBA4A495"] environment: ["SIMCTL_CHILD_DYLD_INSERT_LIBRARIES": "/Users/vagnerlandio/Example/node_modules/detox-recorder/DetoxRecorder.framework/DetoxRecorder"]
2021-10-25 00:02:14.741 I  Example[37452:40c41] [DetoxRecorder:DetoxRecorderApplicationAccessibility] Enabling accessibility for automation on Simulator.

@mahdieh-dev
Copy link

+1

@Tomroke
Copy link

Tomroke commented Nov 17, 2021

Also suffering from this issue.

@serhWebDev
Copy link

serhWebDev commented Nov 17, 2021

I have a similar problem.

@gio-moros
Copy link

Recorder seems to throw an exception

terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIWindowScene _keyWindowScene]: unrecognized selector sent to class 0x128db85f8'
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot

@williamkunz
Copy link

Same problem.
I am using Hermes, not sure if everyone else is as well

@joaquinperezlopez
Copy link

Same here, did anyone find any workaround?

@evrenos
Copy link

evrenos commented Dec 23, 2021

I have same problem, I ran recorder, app launches & crashes. But I get no error, and recorder says "Recording… (CTRL+C to stop)"

@filipef101
Copy link

Latest detox breaks recorder?

@Bearbobs
Copy link

Bearbobs commented Jan 9, 2022

same issue :(

@dkoudrinhc
Copy link

Same issue. Any updates?

@MuckT
Copy link

MuckT commented Jan 13, 2022

@noomorph is Wix still maintaining this repository?

@noomorph
Copy link

@MuckT , hmm @asafkorem could you write back here?

@dkoudrinhc
Copy link

Would love to see how the recorder works, I had high hopes for this project :) Happy to provide any crash logs.

@asafkorem
Copy link

Sorry guys, we are not maintaining this project at the moment..
We may revisit this decision soon, but for now our focus is on other Detox improvements.

@dkoudrinhc
Copy link

Interesting @asafkorem , considering the main project boasts about the recorder as a major feature and links to it from the documentation.

@AndersGerner
Copy link

Maybe the issue is, that on MacOs 12.1 the AccessibilityUtilities.framework are not located, where the script assumes it should?
https://github.com/wix/DetoxRecorder/blob/99820782a02fb771a7c1da4b2d9834abafc89172/DetoxRecorder/Utils/UIApplication%2BEnableAccessibility.m#L27

Or at least, is not present on my machine - Anybody who knows the new location og those utilities?
I am no swift expert at all, I could just assume, that if that path does not exist, the process could fail?

mergify bot pushed a commit to valora-inc/wallet that referenced this issue Feb 16, 2022
### Description

- Updates detox to [19.4.5](https://github.com/wix/Detox/releases/tag/19.4.5) from [19.4.2](https://github.com/wix/Detox/releases/tag/19.4.2).
- Removes the no longer supported Detox Recorder - [Comment](wix-incubator/DetoxRecorder#15 (comment)).

### Other changes

N/A

### Tested

Tested in CI.

### How others should test

This does not need to be tested by QA. Just make sure CI continues to pass.

### Related issues

N/A

### Backwards compatibility

Yes
@mrk-han
Copy link

mrk-han commented Jul 29, 2022

Still not useable with latest Detox

@asafkorem
Copy link

Hey everyone, I am sincerely sorry, we're not focusing on this project right now as I mentioned earlier, but it's not yet abandoned either.
For the meanwhile, until we'll have the capacity and focus for this project we are open to contributions from iOS developers.

@StevenHallLtd
Copy link

Please consider removing/altering the recommendation here to use detox recorder...
https://wix.github.io/Detox/docs/introduction/writing-first-test#detox-recorder

This was an unfortunate setback in my first time using Detox.

Hopefully I'll enjoy the rest of the product 👍🏼

(PS – I tried the Edit this page link but got a 404)

@johanndeswardt
Copy link

johanndeswardt commented Mar 11, 2024

@asafkorem Any plans to resurrect this project? In my most humble opinion, this tool would be almost as useful as the Detox framework itself!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests