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

Not working on Github Actions CI #32

Open
cayleyh opened this issue Jan 4, 2021 · 9 comments
Open

Not working on Github Actions CI #32

cayleyh opened this issue Jan 4, 2021 · 9 comments

Comments

@cayleyh
Copy link

cayleyh commented Jan 4, 2021

I'm trying to use set-simulator-location for testing behaviour on CI using Detox. It works fine when running locally, but does not work at all when running on Github Actions CI.

Has anyone encountered this? Is it a known limitation or is there some build configuration that is necessary to enable location setting on CI servers?

@keith
Copy link
Member

keith commented Jan 4, 2021

Is the simulator app launched? if not you might try that

@cayleyh
Copy link
Author

cayleyh commented Jan 4, 2021

Yes it has launched & I've confirmed by finding the simulator with the same ID marked as 'booted' with simctl.

@cayleyh
Copy link
Author

cayleyh commented Jan 6, 2021

Any thoughts on things I can try to help debug this?

@triztian
Copy link

triztian commented Jan 15, 2021

The tool relies on DistributedNotificationCenter, I've seen some older reports that indicate that it might not be working on recent macOS versions, for example: https://developer.apple.com/forums/thread/129437

Not sure if your issue would be the same as that one but worth exploring around it.

@cayleyh
Copy link
Author

cayleyh commented Jan 26, 2021

Thanks @triztian. Theoretically the version of MacOS that is running the the Github Actions container is the same as what I'm running locally, but I'll check this out to see if anything others have reported here can help debug better.

@KatieSnell-TomTom
Copy link

KatieSnell-TomTom commented May 26, 2021

I think I am noticing the same thing on my Detox setup, which is using TeamCity rather than Github Actions CI. Works locally, but not on the build system.

Any ideas what could be different between the local build and the CI system?

@henriquenfaria
Copy link

henriquenfaria commented Feb 8, 2022

Same issue on Azure Pipelines machines. Has anyone found a solution already?

@SergeyKrivorotko
Copy link

I am working on Jenkins. Before the set-simulator-location command, you must specify the path to the executable file.
Example below:
PATH="/Users/jenkins:$PATH"
set-simulator-location -c 66.940231 10.317264

@keith
Copy link
Member

keith commented Jan 17, 2023

You should try Xcode 14's new feature for this, maybe it doesn't have this issue:

% xcrun simctl location
Control a device's simulated location
Usage: simctl location <device> <action> [arguments]

    list
        List available simulation scenarios.

    clear
        Stop any running scenario and clear any simulated location.

    set <lat1>,<lon1>
        Set the location to a specific latitude and longitude.

    run <scenario>
        Run a simulated location scenario (use the list action to get a list of scenarios).

    start [--speed=<meters/sec>] [--distance=<meters per second>|--interval=<seconds>] <lat1>,<lon1> <latN>,<lonN>...
        Set the location to a series of waypoints specified as 'lat,lon' pairs, interpolating between them over time.
        At least two waypoints are required. Use '-' to read waypoints from stdin, one waypoint per line.

        Speed specifies how quickly to move between waypoints in meters per second. If not specified 20m/s is used.

        The system will issue location updates along the path between each pair of waypoints. Use distance or interval to
        control how often those updates are issued. Distance will issue an update every <meters> travelled without regard
        for the time between updates. Interval will issue updates at fixed times without regard for how much
        the location moves between updates.
        If neither are specified an interval of 1.0 seconds is used. If both are specified the system picks ones.

        Example simulating a direct line between San Francisco and New York City, with updates every km:
          set --distance=1000 --speed=260 37.629538,-122.395733 40.628083,-73.768254

Latitude and longitude pairs must be specified using '.' as the decimal separator and ',' as the field separator.

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

No branches or pull requests

6 participants