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

Can't run hubs-cloud branch against my instance #5714

Open
leonardoazzi opened this issue Sep 14, 2022 · 9 comments
Open

Can't run hubs-cloud branch against my instance #5714

leonardoazzi opened this issue Sep 14, 2022 · 9 comments
Labels
bug needs triage For bugs that have not yet been assigned a fix priority

Comments

@leonardoazzi
Copy link
Contributor

Description
I've checkout to hubs-cloud branch after the latest release (september/22). When I run it, I'm getting a blank page and some errors when I access the home page or some room.

To Reproduce
Steps to reproduce the behavior:

  1. Checkout and pull in the hubs-cloud branch
  2. Install with npm ci
  3. Do npm run login with your hubs-cloud instance
  4. Do npm start

Expected behavior
Able to navigate the home page and rooms.

Screenshots
image

image

Hardware

  • Device: Desktop
  • OS: Pop_OS 22.04
  • Browser: Firefox, Chrome
@leonardoazzi leonardoazzi added bug needs triage For bugs that have not yet been assigned a fix priority labels Sep 14, 2022
@NigelRidderhof
Copy link

Do you immediately get a white page? Myself and others have had such a problem before, if you have a similar one clearing your local storage could be the solution.
Open dev tools > Application > Local Storage > Right click on the child element > Clear.
Not a 100% sure this is your problem as well, but there is no bug harm in clearing this. It simply logs you out and stuff. You first check the contents of that child element if you want, before clearing it. Or you can first search for other messages on this "white page" error to check if it might be relecant in the first place.

@johnshaughnessy
Copy link
Contributor

@leonardoazzi That first error (_react_components_styles_them_WEBPACK_IMPORTED_MODULE_0_.themes.find is not a function) looks suspicious, as if you have themes defined in your admin panel that are failing to be parsed. (This might also be the case if you cleared it to blank, because I think we might fail to fall-back to defaults in that case.)

If you copy/paste these default themes into the config in your admin panel, does that fix the problem? https://github.com/mozilla/hubs/blob/c53c2f17a7c5b2f1c7d0e1bbe019348c65a75cdc/themes.json

@leonardoazzi
Copy link
Contributor Author

Do you immediately get a white page? Myself and others have had such a problem before, if you have a similar one clearing your local storage could be the solution. Open dev tools > Application > Local Storage > Right click on the child element > Clear. Not a 100% sure this is your problem as well, but there is no bug harm in clearing this. It simply logs you out and stuff. You first check the contents of that child element if you want, before clearing it. Or you can first search for other messages on this "white page" error to check if it might be relecant in the first place.

Unfortunately this was not the issue. :(
But that's an important tip. Thank you!

@leonardoazzi
Copy link
Contributor Author

@leonardoazzi That first error (_react_components_styles_them_WEBPACK_IMPORTED_MODULE_0_.themes.find is not a function) looks suspicious, as if you have themes defined in your admin panel that are failing to be parsed. (This might also be the case if you cleared it to blank, because I think we might fail to fall-back to defaults in that case.)

If you copy/paste these default themes into the config in your admin panel, does that fix the problem? https://github.com/mozilla/hubs/blob/c53c2f17a7c5b2f1c7d0e1bbe019348c65a75cdc/themes.json

Hey @johnshaughnessy ,

I supposed it could be something related, as it mentions the themes. I've changed the theme JSON to these, but there was no effect.
image
image

However, I've tested using the master branch, and it works just fine. Even with a slightly custom theme.
image
image

Could be this a bug in the release?

@johnshaughnessy
Copy link
Contributor

It looks like the webpack-injected APP_CONFIG isn't loading correctly either.

The recent release included an upgrade to node LTS 16 and webpack 5. Could it be a tooling problem? (This wouldn't explain why it works on the latest master commites and not on the hubs-cloud branch, unless your master branch pointer isn't up-to-date.)

@leonardoazzi
Copy link
Contributor Author

leonardoazzi commented Sep 14, 2022

I'm using Node v16.16.0, and webpack is now 5.74.0.

(This wouldn't explain why it works on the latest master commites and not on the hubs-cloud branch, unless your master branch pointer isn't up-to-date.)

I think it is up-to-date, I've checked on my gitk:
image

@camelgod
Copy link

Does your terminal where you run the local server show something different / more than web console? Sometimes webpack errors show up becuase there is an additional compile error somewhere.

@leonardoazzi
Copy link
Contributor Author

Hi, @camelgod. I think there is nothing different in my console :c
image

@leonardoazzi
Copy link
Contributor Author

The /src/utils/theme.js was not parsing the theme correctly in this version. It was trying to use .find() in a string, without parsing. I've solved locally as I report here: 07ec12d#r84387359

I don't know if it is a legit issue, so I'll leave to the Team to consider @johnshaughnessy @netpro2k xD

Thanks everyone for your help and attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage For bugs that have not yet been assigned a fix priority
Projects
None yet
Development

No branches or pull requests

4 participants