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

DeMod prevents left sidebar from loading, gives an error #68

Closed kamitchell closed 1 week ago

kamitchell commented 3 weeks ago
image

ChatGPT-DeMod 5.0 Microsoft Edge Version 130.0.2849.56 (Official build) (arm64) macOS 14.7 (23H124)

I get the above error when loading up ChatGPT with the ChatGPT-DeMod script turned on, and the sidebar list of chats does not appear.

Here's the link to the React error: https://react.dev/errors/418?args[]=

WingSentinel commented 3 weeks ago

Hello. I would like to mention, I too am also encountering this error, if it helps. I am on google chrome.

4as commented 2 weeks ago

I'm unable to reproduce this issue on either Chrome, Edge, or Firefox. What if you turn off DeMod on its UI? Rather then turning the script off. Unless that's what you're already doing?

Also, you could try installing this dev version of DeMod with extra logs: http://4as.pl/other/demod.user.js The extra logs could potentially help me understand what's happening. Note: extra logs contain new responses you generate, till you refresh the page.

valavaern commented 2 weeks ago

Having the same issue, tried it with the dev build: no luck with turning it off with its UI. Can only get thing to load properly if the script is fully disabled in GreaseMonkey. Include log should have initial page load with the script on, turning the script off in its UI and re-loading page, then finally deactivating the script and reloading the page. console-export-2024-11-2_20-46-19.txt

EDIT: That was a bad/wrong log file. THIS should be the correct Firefox log dump: console-export-2024-11-2_20-58-35.txt

Running firefox 132.0 on Windows 10.

4as commented 2 weeks ago

Nothing really stands out here, although there is a mention of the fetch() method which DeMod intercepts. I wonder if there is something wrong with it. Could you open DeMod script for editing? Through GreaseMonkey settings or by clicking on the GreaseMonkey icon when you're on ChatGPT's page. Go the line 459, which starts with 'target_window.fetch =' and put '/*' in front of it. Then scroll to line 607, where it says 'return original_promise; }' and put '*/' at the end, after the curly bracket. Then save. This basically disables DeMod interception, but still leaves UI and other functions on. If this change makes the sidebar load, then we will know what portion of DeMod interferes with it.

valavaern commented 2 weeks ago

Nothing really stands out here, although there is a mention of the fetch() method which DeMod intercepts. I wonder if there is something wrong with it. Could you open DeMod script for editing? Through GreaseMonkey settings or by clicking on the GreaseMonkey icon when you're on ChatGPT's page. Go the line 459, which starts with 'target_window.fetch =' and put '/*' in front of it. Then scroll to line 607, where it says 'return original_promise; }' and put '*/' at the end, after the curly bracket. Then save. This basically disables DeMod interception, but still leaves UI and other functions on. If this change makes the sidebar load, then we will know what portion of DeMod interferes with it.

Just did all that, and, yes, commenting out that part of codes DOES allow the rest of the page to load, no matter whether the DeMod UI says it's on or off.

It's possible that chatGPT put in some sort of extra 'hand-shake' between the generation system and the mod system that the script isn't quite mimicking properly? It's weird that it's still working fine for you, though.

4as commented 2 weeks ago

I honestly have no idea what is going on, your logs are completely different from my logs. Can you re-download the dev script again? http://4as.pl/other/demod.user.js It has extra logs in fetch, maybe they will tell me more.

valavaern commented 2 weeks ago

I thought I did have that one installed while testing, but I've just removed the script, re-downloaded the dev version (making sure to turn OFF auto-update), and have these logs now: console-export-2024-11-3_23-16-0.txt

4as commented 2 weeks ago

I did some research and I think my method of intercepting fetch requests is not a proper way to do is. I once again updated the dev script: http://4as.pl/other/demod.user.js This one uses more modern Proxy wrapper. See if it helps. If not maybe logs will reveal something new at least.

valavaern commented 1 week ago

Did some more looking: it seems loading the script with tampermonkey, instead of greasemonkey, which I had been using, has fixed the issue. It could be that something in Greasemonkey itself is outdated.

Thank you for all of the help!