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

cannot work in Github Action env #5

Open
begoat opened this issue Apr 7, 2020 · 1 comment
Open

cannot work in Github Action env #5

begoat opened this issue Apr 7, 2020 · 1 comment

Comments

@begoat
Copy link

begoat commented Apr 7, 2020

Hi @brandonocasey , Thanks for this awesome libs.
It works on my local machine(10.14.6)

But I want to use it in Github Action env, it failed.

Here are the logs.

[karam-test:singlerun] 07 04 2020 00:32:46.389:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
[karam-test:singlerun] 07 04 2020 00:32:46.389:INFO [launcher]: Launching browsers Safari with concurrency unlimited
[karam-test:singlerun] 07 04 2020 00:32:46.403:INFO [launcher]: Starting browser Safari
[karam-test:singlerun] 07 04 2020 00:32:46.403:DEBUG [launcher]: null -> BEING_CAPTURED
[karam-test:singlerun] 07 04 2020 00:32:46.404:DEBUG [temp-dir]: Creating temp dir at /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/karma-97775348
[karam-test:singlerun] ee
[karam-test:singlerun] 07 04 2020 00:34:48.361:ERROR [karma-server]: UncaughtException
[karam-test:singlerun] 07 04 2020 00:34:48.362:DEBUG [launcher]: Disconnecting all browsers
[karam-test:singlerun] 07 04 2020 00:34:48.370:DEBUG [launcher]: BEING_CAPTURED -> BEING_KILLED
[karam-test:singlerun] 07 04 2020 00:34:48.371:DEBUG [launcher]: BEING_KILLED -> BEING_FORCE_KILLED
[karam-test:singlerun] ee
[karam-test:singlerun] 07 04 2020 00:36:48.711:ERROR [karma-server]: UncaughtException
[karam-test:singlerun] 07 04 2020 00:36:48.712:DEBUG [launcher]: Disconnecting all browsers
[karam-test:singlerun] 07 04 2020 00:36:48.712:DEBUG [launcher]: BEING_FORCE_KILLED -> BEING_FORCE_KILLED
[karam-test:singlerun] 07 04 2020 00:36:48.712:DEBUG [launcher]: BEING_FORCE_KILLED -> FINISHED
[karam-test:singlerun] npm ERR! code ELIFECYCLE

here is my karma.config.js

    plugins: ['karma-*', 'karma-safari-applescript-launcher'],

    // start these browsers
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
    // browsers: ['ChromeHeadlessCustom'],
    browsers: ['Safari'],

here is my github action.yaml

  run-on-safari:
    runs-on: macos-latest
    strategy:
      matrix:
        node-version: [10.x, 12.x]
      fail-fast:
        false
    steps:
    - uses: actions/checkout@v2

    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}

    - run: yarn --frozen-lockfile

    - run: yarn run test
@Finesse
Copy link

Finesse commented Sep 3, 2020

I have another error in Github Actions:

logs
2020-09-03T12:23:55.3269980Z $ karma start --single-run --browsers Safari tests/karma.conf.js
2020-09-03T12:23:55.9421640Z �[32m03 09 2020 12:23:55.938:INFO [karma-server]: �[39mKarma v5.2.1 server started at http://localhost:9876/
2020-09-03T12:23:55.9427030Z �[32m03 09 2020 12:23:55.942:INFO [launcher]: �[39mLaunching browsers Safari with concurrency unlimited
2020-09-03T12:23:55.9505120Z �[32m03 09 2020 12:23:55.950:INFO [launcher]: �[39mStarting browser Safari
2020-09-03T12:24:56.0819760Z �[33m03 09 2020 12:24:56.081:WARN [launcher]: �[39mSafari have not captured in 60000 ms, killing.
2020-09-03T12:26:07.3792280Z �[91m03 09 2020 12:26:07.378:ERROR [karma-server]: �[39mUnhandledRejection: Command failed: osascript -e 
2020-09-03T12:26:07.3792820Z     set wasopen to false
2020-09-03T12:26:07.3793140Z     if application "Safari" is running then set wasopen to true
2020-09-03T12:26:07.3793270Z     tell application "Safari"
2020-09-03T12:26:07.3793480Z       make new document with properties {URL:"http://localhost:9876/?id=74805529"}
2020-09-03T12:26:07.3793680Z     end tell
2020-09-03T12:26:07.3793870Z     return wasopen
2020-09-03T12:26:07.3794380Z     
2020-09-03T12:26:07.3795410Z 118:203: execution error: Safari got an error: AppleEvent timed out. (-1712)
2020-09-03T12:26:07.3795640Z 
2020-09-03T12:26:07.3795740Z 
2020-09-03T12:26:07.3805490Z �[91m03 09 2020 12:26:07.379:ERROR [karma-server]: �[39mError: Command failed: osascript -e 
2020-09-03T12:26:07.3805740Z     set wasopen to false
2020-09-03T12:26:07.3805890Z     if application "Safari" is running then set wasopen to true
2020-09-03T12:26:07.3806020Z     tell application "Safari"
2020-09-03T12:26:07.3806200Z       make new document with properties {URL:"http://localhost:9876/?id=74805529"}
2020-09-03T12:26:07.3806370Z     end tell
2020-09-03T12:26:07.3806470Z     return wasopen
2020-09-03T12:26:07.3806600Z     
2020-09-03T12:26:07.3807130Z 118:203: execution error: Safari got an error: AppleEvent timed out. (-1712)
2020-09-03T12:26:07.3807260Z 
2020-09-03T12:26:07.3807320Z 
2020-09-03T12:26:07.3807460Z     at makeError (/Users/runner/work/foo/bar/node_modules/execa/index.js:172:9)
2020-09-03T12:26:07.3807620Z     at /Users/runner/work/foo/bar/node_modules/execa/index.js:277:16
2020-09-03T12:26:07.3807780Z     at processTicksAndRejections (internal/process/task_queues.js:97:5) {
2020-09-03T12:26:07.3807910Z   code: 1,
2020-09-03T12:26:07.3808360Z   stdout: '',
2020-09-03T12:26:07.3808830Z   stderr: '118:203: execution error: Safari got an error: AppleEvent timed out. (-1712)\n',
2020-09-03T12:26:07.3808990Z   failed: true,
2020-09-03T12:26:07.3809110Z   signal: null,
2020-09-03T12:26:07.3809530Z   cmd: 'osascript -e \n' +
2020-09-03T12:26:07.3809980Z     '    set wasopen to false\n' +
2020-09-03T12:26:07.3810460Z     '    if application "Safari" is running then set wasopen to true\n' +
2020-09-03T12:26:07.3810890Z     '    tell application "Safari"\n' +
2020-09-03T12:26:07.3811480Z     '      make new document with properties {URL:"http://localhost:9876/?id=74805529"}\n' +
2020-09-03T12:26:07.3812100Z     '    end tell\n' +
2020-09-03T12:26:07.3812690Z     '    return wasopen\n' +
2020-09-03T12:26:07.3813210Z     '    ',
2020-09-03T12:26:07.3813430Z   timedOut: false,
2020-09-03T12:26:07.3813550Z   killed: false
2020-09-03T12:26:07.3814670Z }

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

2 participants