4as / ChatGPT-DeMod

Tampermonkey/Greasemonkey script that hides the moderation results when communicating with ChatGPT.
GNU General Public License v2.0
420 stars 59 forks source link

'Unexpected end of JSON input' when DeMod is active. #38

Closed sschroeder59 closed 9 months ago

sschroeder59 commented 10 months ago

image

Only occurs when its on. Anyone else experiencing this?

4as commented 10 months ago

Is that ChatGPT4? I don't have access to it so I can't verify what is wrong, however ChatGPT3.5 seems to work fine for me at this moment. Can you verify whether the issue is with ChatGPT4, 3.5, or both?

sschroeder59 commented 10 months ago

Oops, thanks for pointing that out. I usually use ChatGPT-4. I just now tried 3.5 though, same issue, exact same result.

sschroeder59 commented 10 months ago

Addendum: What's really interesting is if I reload the page later, it shows the response, both in the case of ChatGPT-3.5 and 4. It won't work at the time, but (SOMETIMES) it shows up later. :/ Confusing.

4as commented 10 months ago

So far everything for me is in order, which means they might be rolling out new changes. Usually some changes are not instantly available to, for example, Europeans, even tho they released them in US. Anyway, JSON error indicates that they changed something in the format the messages are arriving. I'll need to know what is it before I can fix it. Which means you'll have to wait until they make their changes available to me too.
In the mean time you can try different browser to be sure it's nothing on your end. Or, if you know what you're doing, you could also send me the JSON response that ChatGPT is sending and I could try fixing the format based on that.

sschroeder59 commented 10 months ago

I've never tried using Tampermonkey on anything but Chrome, not even sure which browser would be a good alternative. ^^; I'm definitely in the category of 'barely knows what they're doing'.

I've tried removing the extension and script and reinstalling both just to try -that- option, but the same error occurs. I'll keep checking on here, thanks for taking the time to respond! :)

e39a562r commented 10 months ago

I'm getting same error message since yesterday. image

Seems they are really rolling out new version to more user. I still can get correct response by refresh the page, so it's not a big impact.

e39a562r commented 10 months ago

While I preparing the patch, I encounter 3 bugs from OpenAI themselves, so... I guess we probably are using a beta branch and they probably will update their code again soon.

.. or maybe they accidentally rolled out an alpha branch. 🀣

OMGitsMatt45 commented 10 months ago

Happened to me too. Just put in an official bug report about it

OMGitsMatt45 commented 10 months ago

When do you think the ChatGPT update would finally drop?

OMGitsMatt45 commented 10 months ago

HOLY SHIT IT'S FINALLY GONE NOW! I think we can close this as an issue but 4as you might want to take a look and see if anything's changed.

e39a562r commented 10 months ago

It's gone for me too. I'll close the PR.

4as commented 10 months ago

That's a bit unexpected. I'll leave the issue open just in case they rolled back the changes temporarily. They might have been just testing something and real update will be coming up later.

KDLGates commented 9 months ago

I don't have much more to add except this same Unexpected end of JSON input error started occurring for me today, occurring consistently but I also get the response after waiting and reloading the conversation (appears to break the streaming response). I hadn't seen it before, and now it's consistent when running with the currently updated Tampermonkey install of DeMod. Also running on GPT-4 with a custom GPT.

ShionArtist commented 9 months ago

m 3

so the error came up around today with demod disabled via grease monkey cchatgpt works here's the console

ai 1

turned off u origin and narrowed down the red to these 2

OMGitsMatt45 commented 9 months ago

happy to me again today

Chad-RK commented 9 months ago

Disabling uBlock Origin simply gave me a few normal JavaScript errors that just reiterated the problem of "unexpected end of JSON input". Possible they changed how the API returns certain things on the backend?

EDIT: @e39a562r 's patched script seems to fix it entirely.

sunnys1d3 commented 9 months ago

@e39a562r's patch works.

Agooro commented 9 months ago

@e39a562r's patch works.

How to apply the patch Gone through @e39a562r's patch thread, but do not know where and how to apply it. Could you please show?

ShionArtist commented 9 months ago

@e39a562r's patch works.

How to apply the patch Gone through @e39a562r's patch thread, but do not know where and how to apply it. Could you please show?

download the .js file and then drag ot to the browser, greasemonkey should show a reinstall. the patch works^^

4as commented 9 months ago

For people who are using @e39a562r patch please confirm whether it works correctly on Android and iOS too. If it does then I'll officially pull into the main release of DeMod.

OMGitsMatt45 commented 9 months ago

I mean it works, but it doesn't show flagged or rejected notifications next to the DeMod on or off button

e39a562r commented 9 months ago

Uhhh suddenly a lot of notifications. πŸ””πŸ””πŸ””

The bug currently not happening on my account so I can't test it. Somebody please help to test the patch on mobile devices. πŸ™. My patch is not good, users have to manually refresh the page after ChatGPT finish generating, but feel free to use/include it. πŸ‘πŸ‘πŸ‘

Chad-RK commented 9 months ago

Yeah, the patch is definitely a stopgap rather than a true solution. Sometimes generations inside long chats stop midway through?not, like, stop streaming, but stop generating altogether. A refresh proves that the generation didnt finish. No clue what's causing that one.

OMGitsMatt45 commented 9 months ago

I think it's back to normal again

OMGitsMatt45 commented 9 months ago

nope, nevermind

OMGitsMatt45 commented 9 months ago

I'm getting this in my console. Screenshot (231)

OMGitsMatt45 commented 9 months ago

So it turns out they're doing a slow roll out or A/B testing

OMGitsMatt45 commented 9 months ago

Are we in the clear now?

OMGitsMatt45 commented 9 months ago

Nevermind...guess what's back

etherealxx commented 9 months ago

Happened to me again just now, just this afternoon i guess, very recent. When you refresh the page, then output is displayed there, but you need to refresh everytime

OMGitsMatt45 commented 9 months ago

Is anyone getting stuff past moderation with the error?

etherealxx commented 9 months ago

Happened to me again just now, just this afternoon i guess, very recent. When you refresh the page, then output is displayed there, but you need to refresh everytime

Found out that the bug only happened on desktop for some reason? On mobile the DeMod works just fine. On Desktop, if you open inspect element and use mobile mode, it will also runs fine

TrollMasterr commented 9 months ago

thanks etherealxx yea just installing extension "User-Agent Switcher for Chrome" even on edge and choosing "android" in options fixes the issue completely

4as commented 9 months ago

Can anyone confirm for me if this issue still exists with the latest version of DeMod 4.0?

ZarkoSSR commented 9 months ago

Can anyone confirm for me if this issue still exists with the latest version of DeMod 4.0?

It works for me now. I had the error constantly on computer for a while and this update has solved it. Thank you for your hard work, this has done wonders for me!

etherealxx commented 9 months ago

Can anyone confirm for me if this issue still exists with the latest version of DeMod 4.0?

The fix worked for me too, the issue is now nonexistent. Thanks for spending time fixing the bug, a lot of people using this extension. Great workπŸ™

OMGitsMatt45 commented 9 months ago

Works for me. You're the greatest!