ChatGPT bug (Oct 4): Chat history off = current conversation session getting wiped after short inactivity

Someone else also posted a script: reddit dot com, then /r/ChatGPT/comments/17099n8/bug_with_chat_history_turned_off_conversations/

Based on the developer’s comments on Greasy Fork it is in fact deliberate. Although the feature does indeed seem to be very buggy.

4 Likes

Great work!

It’s sad that time and time again people need to create bypasses and find compromises just to use a chat application.

No changelogs, and based on my experience here I doubt it’ll ever be acknowledged. I’m hopeful though.

Somebody seriously needs to ask ChatGPT to create some unit tests.

Here’s the link:

https://justpaste.it/bh1iz

The reddit link:

I can verify that both scripts are safe and simply modify the event listeners that have been used to (incorrectly) monitor user inactivity of 10 minutes.

7 Likes

I hope there is a way to disable this new behavior, completely breaks how I use this. Seems like a great feature that I’m sure people are interested in, but we need to have a way to disable it in the settings. Has anyone identified a proper feedback channel for us to advocate for fixing this?

2 Likes

I really appreciate seeing this script out there, is anyone looking at turning this into a bookmarklet by any chance? I think having this in bookmarklet form would be absolutely ideal

3 Likes

ok this bug is really pesky. Here are some observations:
I tried running the 2 tampermonkey scripts suggested so far within the chat.

/r/ChatGPT/comments/17099n8/bug_with_chat_history_turned_off_conversations/ - this one does not work :frowning:

justpaste dot it bh1iz - this one works! :slight_smile:

There is still one scenario that none of these scripts have handled yet - when in chat history off mode, try clicking on … > settings & beta ----- boom your chat conversation is gone :melting_face:

2 Likes

I tried running the following bookmarklet form javascript within chrome > F12> console .It doesnt seem to work since it is run after page load.

You need to run the script at page load - which is what tampermonkey does:

‘use strict’;
const eventsToRemove = [‘focus’, ‘visibilitychange’,‘autoFocusOnMount’,‘focusScope’];

const shouldRemoveListener = (type, listener) => {
if (eventsToRemove.includes(type)) {
return true;
}
if (listener.name === ‘focusScope.autoFocusOnMount’) {
return true;
}
return false;
};

const overrideEventListener = (obj, funcName) => {
const originalFunction = obj[funcName];
if (typeof originalFunction !== ‘function’) {
console.error(${funcName} is not a function on the provided object.);
return;
}
obj[funcName] = function(type, listener, options) {
if (shouldRemoveListener(type, listener)) {
console.log(Prevented ${type} event listener from being added to ${obj === window ? 'window' : 'document'});
} else {
originalFunction.call(this, type, listener, options);
}
};
};

overrideEventListener(window, ‘addEventListener’);
overrideEventListener(document, ‘addEventListener’);

1 Like

Greasemonkey didn’t work for me, only Tempermonkey. Prevent ChatGPT Conversation Reset works fine (so far).

1 Like

You’re correct; I misspoke earlier. I was actually referring to Tampermonkey, not Greasemonkey. Thanks for bringing it to my attention!

2 Likes

How much does it cost to subscribe to Microsoft owned ChatGPT thingy?

1 Like

Microsoft own 49% of OpenAI LP, OpenAI LP is for profit company under OpenAI Inc.

2 Likes

Same with me! Totally annoying! I don’t want to turn history on.

4 Likes

Thinking about it this morning, I bet we can do this as a bookmarklet by just stopping the events from the top level in the capture phase, right? I’ll give it a try in a bit

1 Like

As someone who’s not very tech-savvy and an outsider when it comes to these things, I’ve been following all the comments offering different solutions such as scripts and bookmarklets, and I’m not sure what to do next. If anyone can clarify on what’s the best thing to do, or can share instructions, I’d greatly appreciate it!

I think the tampermonkey thing is guaranteed to work, but I’m weird about installing extensions. I’m trying this bookmarklet out now and will report back if it works.

javascript: (function () {
  const events = ["focus", "visibilitychange"];
  events.forEach((event) =>
    window.addEventListener(
      event,
      function (event) {
        event.stopImmediatePropagation();
      },
      {
        capture: true,
      }
    )
  );
})();

I don’t think it will because I think they do some capture level stuff on window so you have to override internals, but I’ll report back in >10 minutes

1 Like

Yeah, that bookmarklet didn’t do it. I think Tampermonkey is the only way to get elevated enough access to make OpenAI actually iterable.

Okay, I’m trying one more. This is quite janky, but is looking pretty good thus far :rofl:

javascript: (function () {
  document.visibilityState = 'visible';
  Object.freeze(document);
})();

EDIT: Shucks, no dice again. Looks like its Tampermonkey or bust

1 Like

LOL, You are trying every hook and crook😅

3 Likes

:heart: I peddle my flimsy javascripts out of the back of a van down by the river

Ah, nevermind. Didn’t seem to work either :sob:

2 Likes

I have a video of the bug, if OpenAI needs it please email me. I’m hoping this bug is a top priority.

3 Likes

I don’t know why you love bookmarklets so much. Conversation with GPT-4:

QUESTION: Does a Tampermonkey userscript with @grant none and no @connect directive have elevated permissions compared to bookmarklets?

ANSWER: No, a userscript with Tampermonkey that runs with the @grant none directive generally does not have elevated permissions compared to a bookmarklet. Both run in the context of the respective website and can access the DOM structure, execute JavaScript functions, and so on. The @grant none directive means that the script does not have access to special GM functions (Greasemonkey functions) or APIs that go beyond the normal web APIs.

The missing @connect directive also has no impact on the script’s rights with respect to the current page; it would only affect which external servers the script could communicate with.

The main difference between a userscript and a bookmarklet lies in convenience and automation: userscripts are automatically loaded on the specified pages, while a bookmarklet must be manually triggered. In addition, userscripts can gain additional permissions through the use of other @grant options that would not be available to a bookmarklet. But in your specific case with @grant none and no @connect, there are no differences in permissions.

2 Likes

Visual Event 2 left a profound impact on my younger mind.

I also just like having less extensions installed. Also, with like manifest v3 already here and with an enigmatic kill date for manifest v2, we might wake up in a month or two and find none of the stuff we use works anymore.

2 Likes