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

Menu not loading in Edge #4784

Closed
juliemars opened this issue Jul 28, 2018 · 23 comments
Closed

Menu not loading in Edge #4784

juliemars opened this issue Jul 28, 2018 · 23 comments

Comments

@juliemars
Copy link

juliemars commented Jul 28, 2018

Describe the bug
In todays update if I go to the webpage then the menu that should appear in the upper right hand corner is missing as can be seen in the below image.

image

If I use Firefox then the menu appears.
image

To Reproduce
Steps to reproduce the behavior:

  1. Log into Medusa using Edge from latest Windows 10
  2. Menu doesn't load.

Expected behavior
Menu appears

Edge Log
I used F12 and under Console I have 8 errors shown:

image

@OmgImAlexis
Copy link
Collaborator

Possible duplicate? #4772

@sharkykh
Copy link
Contributor

sharkykh commented Aug 6, 2018

I remember trying it on the latest Edge and couldn't reproduce.
@juliemars Try CTRL + F5. Should eliminate the errors.

@juliemars
Copy link
Author

Hi Sharkykh thanks for the reply, I tried that and nothing the issue remains. I have also cleared cookies and cache and tried on multiple PC's and the issue remains. Works fine in Firefox though but not private browsing.

@sharkykh
Copy link
Contributor

sharkykh commented Aug 6, 2018

You should try the develop branch then, maybe we inadvertently fixed the underlying issue.
Use git if you're familiar with it, or enter your Github credentials in the general config (under advanced tab), and you should be able to checkout the develop branch (option is above the Github credentials).

@sharkykh

This comment has been minimized.

@juliemars
Copy link
Author

@sharkykh and @OmgImAlexis I had some spare time today and tried to troubleshoot this further. I think I have a cause but not a solution.

I use a reverse proxy on NGINX to access the site if I navigate to the site using the internal IP, Port and base URL lets says http://127.0.0.1:8081/TV it works fine.

I changed the base URL in Medusa and the reverse proxy and it still never worked which makes me think it is something in the reverse proxy setup I have causing the issue.

I compared my proxy settings to the ones on https://github.com/pymedusa/Medusa/wiki/Reverse-Proxy-setup and the only difference was the top 2 lines mine has:

 location /TV/ {
    proxy_pass http://127.0.0.1:8081/TV/;

Which I expected, I am sure this is something simple but I cannot see what it is! if either of you have any ideas I would really appreciate it!

@sharkykh
Copy link
Contributor

  • I'm not familiar enough with setting up reverse proxies.
  • Are you still getting errors on the browser's console?
  • We already did much work on the develop branch (next version), but I can't say for sure if the next version will solve your issue since I can't figure out the issue.

@juliemars
Copy link
Author

Hi Sharkykh no worries hopefully someone else can help with the reverse proxy bit.

When I navigate directly using the internal IP the syntax errors disappear

I will update as soon as it is available and let you know if it fixes it.

@p0psicles
Copy link
Contributor

p0psicles commented Aug 18, 2018

Well I can confirm, but for me it's already not loading the login page.

HTML1300: Navigation occurred.
login
Current window: proxy.server.nl/medusa/login
SCRIPT5022: SyntaxError
build.js (110,36)
You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
eval code (2048) (7751,7)
SCRIPT5007: Unable to get property 'fn' of undefined or null reference
vender.min.js (1,7696)
SCRIPT5009: 'jQuery' is undefined
bootstrap-formhelpers.min.js (6,1)
SCRIPT5009: '$' is undefined
parsers.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
index.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
init.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
notifications.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
init.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
popular-shows.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
recommended-shows.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
trending-shows.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
init.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
index.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
post-process.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
restart.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
status.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
failed-downloads.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
index.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
init.js (1,1)
SCRIPT5009: 'MEDUSA' is undefined
subtitle-missed.js (1,1)
SCRIPT5009: 'jQuery' is undefined
browser.js (1,2)
SCRIPT5009: 'PNotify' is undefined
notifications.js (3,1)
SCRIPT5007: Unable to get property 'push' of undefined or null reference
login (237,1)
SCRIPT5007: Unable to get property 'push' of undefined or null reference
login (503,1)
SCRIPT5009: 'Vue' is undefined
login (508,13)
SCRIPT5007: Unable to get property 'forEach' of undefined or null reference
app.js (55,1)

Seems to have something to do with the WebSocket.

return r(e, [{ key: "connect", value: function value(e) {
          var t = this,
              n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
              o = n.protocol || "";return this.WebSocket = n.WebSocket || ("" === o ? new WebSocket(e) : new WebSocket(e, o)), "json" === this.format && ("sendObj" in this.WebSocket || (this.WebSocket.sendObj = function (e) {
            return t.WebSocket.send(JSON.stringify(e));
          })), this.WebSocket;

But unfortunately I can't trace it back to a source file.

@sharkykh
Copy link
Contributor

sharkykh commented Aug 19, 2018

Where did you get that websocket code?

Also, please check the first error:

SCRIPT5022: SyntaxError
build.js (110,36)

I think that's a webpack builtin. I wonder what is the syntax error.

@OmgImAlexis
Copy link
Collaborator

@sharkykh is that trying to connect the websocket on the login page? If so it won't be authenticated, that may be the issue?

@p0psicles
Copy link
Contributor

I cant see the syntax error. Anything i can check?

@sharkykh
Copy link
Contributor

@OmgImAlexis It's possible that's the case on master, but not on develop.
@p0psicles I'm not sure :\

@p0psicles
Copy link
Contributor

Im running develop. The syntax highlighted piece of code is from that error.

@p0psicles
Copy link
Contributor

I'm changing this to bug prio high. As medusa is just not working at all with it.
But we have edge listed as a supported browser.

So either we should fix this asap.
Or remove it from the supported browsers.

@pymedusa/developers thoughts?

@sharkykh
Copy link
Contributor

sharkykh commented Aug 20, 2018

IMO it should be fixed rather than dropping support for Edge.

@p0psicles
Looks like it only affects reverse proxies and I don't have a setup to test this myself.
You can try commenting out the websocket code from ./src/store/index.js and rebuild the Webpack bundle.

And actually, looks like I was mistaken. The websocket is initialized on the /login page like all other pages. I don't know why I thought it didn't. So it could be the issue.

I have a hunch Edge doesn't support the full spec of the native WebSocket client:
https://developer.mozilla.org/en-US/docs/Web/API/WebSocket#Browser_compatibility

@sharkykh sharkykh removed the Support label Aug 20, 2018
@p0psicles
Copy link
Contributor

I know that edge has troubles with unhandled promises or exceptions.
Maybe that's happening here, when using a reverse proxy?
I'm setting up a dev env on my win10 laptop.

@sharkykh
Copy link
Contributor

sharkykh commented Aug 20, 2018

@p0psicles It's possible, maybe the URL it tries to connect is incorrect, you should look for that when you're debugging.
And if you need it, this is the source of the minified code you sent earlier:
https://github.com/nathantsoi/vue-native-websocket/blob/v2.0.7/src/Observer.js#L21-L31

If you want to debug using that source, you can try changing this import:

import VueNativeSock from 'vue-native-websocket';

to:

import VueNativeSock from 'vue-native-websocket/src/Main';

@p0psicles
Copy link
Contributor

p0psicles commented Aug 20, 2018

That didn't make any difference. Or at least it's still minified.

Drilled it down to this:

this is causing the error: new WebSocket(e)

Similar issue:
https://stackoverflow.com/questions/36667587/syntax-error-on-new-websocket-in-edge-internet-explorer

I think it's causing the error because of a colon.
wss://my.domain.com:/medusa/ws/ui

@p0psicles
Copy link
Contributor

Yeah that fixed it. I'll clean up the branch and PR it.

@sharkykh
Copy link
Contributor

@p0psicles
I agree with you.
Good job tracking it down!

@juliemars
Copy link
Author

Thanks @p0psicles for looking at it, I appreciate it.

Thanks everyone else for the help on this one.

@sharkykh
Copy link
Contributor

Fixed in develop with #4928.

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

No branches or pull requests

4 participants