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

Clean Install: Firefox related tests fail in admin-ui-frontend (macOS) #3894

Closed
owi92 opened this issue Jun 21, 2022 · 9 comments · Fixed by #5551
Closed

Clean Install: Firefox related tests fail in admin-ui-frontend (macOS) #3894

owi92 opened this issue Jun 21, 2022 · 9 comments · Fixed by #5551
Assignees

Comments

@owi92
Copy link
Contributor

owi92 commented Jun 21, 2022

Issue
When installing Opencast on macOS via $ mvn clean install -Pdev -DtrimStackTrace=false a total of 41 Firefox related tests fail in the admin-ui-frontend bundle.
33 of these tests seem to be related to adminNg.services.language
In each case there is an error reading:

[INFO] 	Error: Unexpected request: GET public/org/opencastproject/adminui/languages/lang-de_DE.json 
[INFO] 	No more request expected in /Users/dude/Documents/dev/work/opencast/modules/admin-ui-frontend/bower_components/angular-mocks/angular-mocks.js (line 1569)

See the "grepped" log file below for a description of each failed test.

To Reproduce
Steps to reproduce the behavior:

  1. clone opencast repository
  2. $ mvn clean install -Pdev
  3. see output - note: apparently this only occurs on macOS

Workaround
open opencast/modules/admin-ui-frontend/test/karma.conf.js and edit the following line (should be around line 69):
const allowed = new Set(['ChromeHeadless', 'FirefoxHeadless'])
to
const allowed = new Set(['ChromeHeadless'])

Environment Information

  • OS: [macOS 12.4 with M1 - this also happens on an old intel machine with macOS 10.15]
  • Browser [Firefox 101.0.1]
  • Opencast version [develop branch - opencast 13.x?]

Log
install-errors.log

@gregorydlogan
Copy link
Member

Just to be sure: you do have Firefox installed, right?

@owi92
Copy link
Contributor Author

owi92 commented Jun 21, 2022

Yes, it is my default browser.

@gregorydlogan
Copy link
Member

@mliradelc you've got an M series mac right? I'm assuming you can't reproduce this?

@mliradelc
Copy link
Contributor

Thanks, @gregorydlogan, for ping me, I will try on my M1

On my intel based mac, I don't have issues

@mliradelc mliradelc self-assigned this Jun 29, 2022
@mliradelc
Copy link
Contributor

mliradelc commented Jul 1, 2022

I just tried on my M1 pro, indeed, the build fails with Firefox.

I can confirm this bug, now, there are two workarounds:

  • Uninstall Firefox
  • Disable Firefox in tests when compiling under a M1 mac.

Nevertheless, we need a proper fix for this bug. We removed safari tests because the plugin was very old, but with Firefox we can't have that luxury to not have it.

@snoesberger
Copy link

I do have the same problem on my Mac (M1, Sonoma 14.1.2, Firefox 119.0.1). With the "disable Firefox" workaround, compiling works. But has anyone found a proper solution for this?

@karendolan
Copy link
Member

karendolan commented Jan 22, 2024

@snoesberger @mliradelc @gregorydlogan There is a FireFoxHeadless Karma patch but Karma says it's being deprecated and not accepting new patches...
The patch and concern that the patch might not be merged: karma-runner/karma-firefox-launcher#330 (comment)
The reference stating that Karma is deprecated and not taking new patches: https://github.com/karma-runner/karma#karma-is-deprecated-and-is-not-accepting-new-features-or-general-bug-fixes

Until Opencast can migrate from Karma, or Karma allows that FireFoxHeadless patch, this suggestion to omit the FireFoxHeadless test is a good workaround for running tests on Mac OS X.

@gregorydlogan
Copy link
Member

CC @JulianKniephoff since he was running into this today.

Is there a way of getting Karma to do some logic wrt to which platforms it's testing based on their local arch? It'd be nice if Mac devs didn't have to deal with this.

JulianKniephoff added a commit to JulianKniephoff/opencast that referenced this issue Jan 23, 2024
The old admin UI is on its way out anyway,
so it should be fine to close opencast#3894 with this.
Karma is deprecated anyway, so if we want to fix it properly,
we would need to get a new (frontend) test runner in there,
which I don't see happening.
@JulianKniephoff
Copy link
Member

^ Yes there is ;D

JulianKniephoff added a commit to JulianKniephoff/opencast that referenced this issue Jan 24, 2024
The old admin UI is on its way out anyway,
so it should be fine to close opencast#3894 with this.
Karma is deprecated anyway, so if we want to fix it properly,
we would need to get a new (frontend) test runner in there,
which I don't see happening.
JulianKniephoff added a commit to JulianKniephoff/opencast that referenced this issue Jan 24, 2024
The old admin UI is on its way out anyway,
so it should be fine to close opencast#3894 with this.
Karma is deprecated anyway, so if we want to fix it properly,
we would need to get a new (frontend) test runner in there,
which I don't see happening.
mtneug added a commit that referenced this issue Jan 24, 2024
The old admin UI is on its way out anyway, so it should be fine to close
#3894 with this. Karma is deprecated anyway, so if we want to fix it
properly, we would need to get a new (frontend) test runner in there,
which I don't see happening.

Note for reviewers: There are two commits here, which are best viewed
individually. The first just fixes some formatting issues in the Karma
config. Or you view the the changes with whitespace ignored, that should
also hide most (not all) of those "irrelevant" changes.
@mtneug mtneug closed this as completed Jan 30, 2024
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

Successfully merging a pull request may close this issue.

7 participants