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

Netflix sync is broken again #394

Closed
AcidSlide opened this issue Sep 4, 2024 · 8 comments · Fixed by #399
Closed

Netflix sync is broken again #394

AcidSlide opened this issue Sep 4, 2024 · 8 comments · Fixed by #399
Labels
bug Something isn't working

Comments

@AcidSlide
Copy link

AcidSlide commented Sep 4, 2024

Expected Behavior

Netflix sync to Trakt Watched items

Current Behavior

Unable to sync with Netflix, but instead showing "Not Logged In" message. This is somewhat related/similar to the previous issue #384 and #385

image

It seems Netflix has changed the watch history link again, and basing on the changes, the fix is not just a change in the ACTIVATE_URL variable but also need to track the profile ID (hashed)

@AcidSlide AcidSlide added the bug Something isn't working label Sep 4, 2024
@r3dicalnusz
Copy link

Would love to see the fix being pushed to the addon stores asap. Really fed up with switching between manual und automatic installs every couple months.

@AcidSlide
Copy link
Author

Would love to see the fix being pushed to the addon stores asap. Really fed up with switching between manual und automatic installs every couple months.

There is no fix yet to the latest changes by Netflix for the watch history

@r3dicalnusz
Copy link

Would love to see the fix being pushed to the addon stores asap. Really fed up with switching between manual und automatic installs every couple months.

There is no fix yet to the latest changes by Netflix for the watch history

I know.

@odin-h
Copy link

odin-h commented Sep 4, 2024

This regex pattern is the reason it doesn't work.

const profileNameRegex = /"userInfo":\{"name":"(?<profileName>.*?)"/;

Netflix changed the structure of that specific object, so the new pattern needs to be:
/"userInfo":\{"data":\{"name":"(?<profileName>.*?)"/

As a quick fix, just replace all occurrences of /"userInfo":\{"name":"(.*?)"/ with /"userInfo":\{"data":\{"name":"(.*?)"/ on all files in the extension folder using Visual Studio Code, and then reload the extension.

@leandroalves99
Copy link

To those who don't want to use VS Code, there's a workaround using the Chrome Dev Tools with the regex shared by @odin-h.
To do so, just do the following:

  1. Open the extension in the History page and open Dev Tools (Right Click -> Inspect).
  2. In Dev Tools, go to Sources and select history.js
  3. Search for /"userInfo":\{"name":"(.*?)"/ and put a breakpoint in that line
  4. Reload the extension and click on Netflix (The dev tool will pop up)
  5. Advance 1 time (Step over next function call option) and paste this in the console: s = /"userInfo":\{"data":\{"name":"(?<profileName>.*?)"/
  6. Resume script execution (play button) in the debug and the history will show up.

Let's hope for a quick fix by the devs!

@ZaViper
Copy link

ZaViper commented Sep 9, 2024

To those who don't want to use VS Code, there's a workaround using the Chrome Dev Tools with the regex shared by @odin-h. To do so, just do the following:

1. Open the extension in the History page and open Dev Tools (Right Click -> Inspect).

2. In Dev Tools, go to Sources and select history.js

3. Search for `/"userInfo":\{"name":"(.*?)"/` and put a breakpoint in that line

4. Reload the extension and click on Netflix (The dev tool will pop up)

5. Advance 1 time (Step over next function call option) and paste this in the console: `s = /"userInfo":\{"data":\{"name":"(?<profileName>.*?)"/`

6. Resume script execution (play button) in the debug and the history will show up.

Let's hope for a quick fix by the devs!

I wanted to dumb this down further for others who aren't familiar with Chrome Dev Tools. As someone who isn't I spent about 40 minutes trying to figure out steps 3-5 as it wasn't clear to me.

  1. Is pretty simple and straight forward.
  2. For sources: when you open "Inspect" a new side window will pop up. If this window is small enough you'll see a button at the top of this newly created window that looks like ">>". You'll want to click on ">>" and select "Sources". If this window is large enough you should just see "Sources" at the top of this new window and you just need to select it. You should anyway stretch the size of this window out to make things easier. When you select "Sources" you'll find "history.js" in the top left column.
  3. When you open "history.js" click anywhere on the top right column where it looks like there is a butch of code then press CTRL+F to bring up the search function. In the "Find" text area search for what leandroalves99 said. To put a breakpoint into that line you'll need to click on the "-" to the left of the code that is in the same line as what you searched for. You should now see what looks like an orange bookmark covering that "-".
  4. To reload the extension just hit the refresh button for the entire page or press F5.
  5. After clicking on Netflix on top of the webpage a yellow popup that says "Paused in debugger" will show. To "Advance 1 time" click on the the arrow "->" that looks like its jumping over a "." After click on the arrow look at the "Inspect" window and at the top where you selected "Sources" in step two, you'll want to click on "Console" which is right next to "Sources". In this window just paste what leandroalves99 said, hit enter.
  6. Press the "play button" on that yellow popup at the top of the webpage.

Hope this further details help those who know nothing about Dev Tools.

@cooldude2200
Copy link

cooldude2200 commented Sep 9, 2024

To those who don't want to use VS Code, there's a workaround using the Chrome Dev Tools with the regex shared by @odin-h. To do so, just do the following:

Thank you so much for dumbing it down for us less technically adept, that worked perfectly.

Hope the devs resolve this.

@AcidSlide
Copy link
Author

Any updates on this? It's been 2 weeks already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants