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

Simulator runtimes not found. java.lang.NullPointerException: list must not be null #1850

Closed
1 task done
filipef101 opened this issue Jul 30, 2024 · 8 comments · Fixed by #1858
Closed
1 task done
Assignees
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P1 Important, valid issues at the top of the work list regression-v1.37.x Issue introduced in the 1.37.x release

Comments

@filipef101
Copy link

filipef101 commented Jul 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

Not clear how to reproduce, could be related to a new way xcode manages/installs runtimes.

Actual results

❯ maestro --version
Exception in thread "main" java.lang.NullPointerException: list must not be null
        at maestro.cli.util.IOSEnvUtils.getSimulatorRuntimes(IOSEnvUtils.kt:19)
        at maestro.cli.analytics.Analytics.maybeUploadAnalyticsAsync(Analytics.kt:147)
        at maestro.cli.AppKt.main(App.kt:99)

Expected results

no error

About app

not relevant

About environment

  • Maestro version: 1.37.4
  • Xcode version: 16 beta
  • macOS version: 15.0
  • Installation method: both Homebrew and curl

Logs

Logs ❯ curl -Ls "https://get.maestro.mobile.dev/" | bash * Create distribution directories... * Downloading... ######################################################################## 100.0% * Checking archive integrity... * Extracting archive... * Copying archive contents... * Cleaning up...

Installation was successful!
Please open a new terminal OR run the following in the existing one:

export PATH="$PATH":"$HOME/.maestro/bin"

Then run the following command:

maestro

Welcome to Maestro!
❯ which maestro
/Users/filipe/.maestro/bin/maestro
❯ maestro
Exception in thread "main" java.lang.NullPointerException: list must not be null
at maestro.cli.util.IOSEnvUtils.getSimulatorRuntimes(IOSEnvUtils.kt:19)
at maestro.cli.analytics.Analytics.maybeUploadAnalyticsAsync(Analytics.kt:147)
at maestro.cli.AppKt.main(App.kt:99)

rm -rf ~/.maestro
rm -rf ~/.local/state/maestro
brew tap mobile-dev-inc/tap
brew install maestro

❯ maestro
Maestro CLI would like to collect anonymous usage data to improve the product.
Enable analytics? [Y/n] Y
Usage data collection enabled. Thank you!
Exception in thread "main" java.lang.NullPointerException: list must not be null
at maestro.cli.util.IOSEnvUtils.getSimulatorRuntimes(IOSEnvUtils.kt:19)
at maestro.cli.analytics.Analytics.maybeUploadAnalyticsAsync(Analytics.kt:147)
at maestro.cli.AppKt.main(App.kt:99)
❯ maestro --version
Exception in thread "main" java.lang.NullPointerException: list must not be null
at maestro.cli.util.IOSEnvUtils.getSimulatorRuntimes(IOSEnvUtils.kt:19)
at maestro.cli.analytics.Analytics.maybeUploadAnalyticsAsync(Analytics.kt:147)
at maestro.cli.AppKt.main(App.kt:99)
❯ which maestro
/opt/homebrew/bin/maestro

Maestro version

1.37.4

How did you install Maestro?

Homebrew

Anything else?

Slack thread https://mobile-dev-inc.slack.com/archives/C041FU72T54/p1722335707236339

After updating to latest version, Maestro is unable to access simulator runtimes, resulting in a NullPointerException. This occurs even when trying to check the Maestro version 🤯

❯ xcrun simctl runtime list
== Disk Images ==
-- iOS --
iOS 17.4 (21E213) - 821D4CFB-369B-47B5-A913-B35EBED48A54 (Ready)

Total Disk Images: 1 (6.7G)

/Library/Developer/CoreSimulator/Profiles/Runtimes
Is empty
Under user folder there is a "runtimeMap" /Users/<myusername>/Library/Developer/CoreSimulator/RuntimeMap.plist
Could be something with xcode beta 16

Using sudo maestro works

❯ sudo maestro --version
1.37.4
❯ sudo which maestro
/opt/homebrew/bin/maestro
@bartekpacia bartekpacia added maestro cli Related to the command-line Maestro tool bug Something isn't working labels Jul 30, 2024
@YonatanSegura97
Copy link

Same issue here.

@bartekpacia bartekpacia self-assigned this Jul 31, 2024
@bartekpacia
Copy link
Contributor

Hey @filipef101 and @YonatanSegura97, can you share what Java version are you on?

@bartekpacia
Copy link
Contributor

/Library/Developer/CoreSimulator/Profiles/Runtimes is empty

Do you mean exactly this path? Because it doesn't exist, actually (at least on my machine).

The right path where iOS simulator runtimes are is:

/Library/Developer/CoreSimulator/Volumes/*/Library/Developer/CoreSimulator/Profiles/Runtimes/

@bartekpacia bartekpacia added the P1 Important, valid issues at the top of the work list label Jul 31, 2024
@bartekpacia
Copy link
Contributor

should be resolved by #1858, not released yet

@bartekpacia bartekpacia added the regression-v1.37.x Issue introduced in the 1.37.x release label Jul 31, 2024
@bartekpacia bartekpacia linked a pull request Jul 31, 2024 that will close this issue
@filipef101
Copy link
Author

/Library/Developer/CoreSimulator/Profiles/Runtimes is empty

Do you mean exactly this path? Because it doesn't exist, actually (at least on my machine).

The right path where iOS simulator runtimes are is:

/Library/Developer/CoreSimulator/Volumes/*/Library/Developer/CoreSimulator/Profiles/Runtimes/

Yeah, that exists

@filipef101
Copy link
Author

filipef101 commented Aug 1, 2024

Hey @filipef101 and @YonatanSegura97, can you share what Java version are you on?

❯ java --version
openjdk 17.0.10 2024-01-16 LTS
OpenJDK Runtime Environment Zulu17.48+15-CA (build 17.0.10+7-LTS)
OpenJDK 64-Bit Server VM Zulu17.48+15-CA (build 17.0.10+7-LTS, mixed mode, sharing)
❯ javac --version
javac 17.0.10

@bartekpacia
Copy link
Contributor

Hey Filipe, this shouldn't happen anymore in the latest version. Please let me know :)

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.
Thank you for helping keep us our issue tracker clean!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P1 Important, valid issues at the top of the work list regression-v1.37.x Issue introduced in the 1.37.x release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants