Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
Stargate38
Fanatic
Fanatic
Posts: 103
Joined: 2018-05-27, 22:55
Location: Earth

Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Stargate38 » 2026-03-20, 14:34

Please always mention the name/domain of the website in question in your topic title.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:

1) Clear any current output
2) Navigate or refresh the page in question
3) Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.

Code: Select all

**PASTE CONSOLE OUTPUT HERE**
Content Security Policy: Couldn’t parse invalid host 'report-sample'  
(unknown)
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: ‘strict-dynamic’ specified  
(unknown)
Content Security Policy: Ignoring “https:” within script-src: ‘strict-dynamic’ specified  
(unknown)
Content Security Policy: Ignoring “http:” within script-src: ‘strict-dynamic’ specified  
(unknown)
Empty string passed to getElementById().  
m=b,dpf:39:163
Empty string passed to getElementById().  
m=attn,cdos,gwc,hsm,jsa,cEt90b,SNUn3,qddgKe,sTsDMc,dtl0hd,eHDfl,YV5bee,d,csi:194:163
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: nonce-source or hash-source specified 
(unknown)
Content Security Policy: Couldn’t process unknown directive ‘require-trusted-types-for’
https://www.google.com/search?q=how+to+ ... +on+reboot (click on AI Mode in the top bar)

I know AI isn't too accurate, and can often mislead, therefore the reason I don't trust it 100%, but I still think it should work instead of throwing an error. Is there any way of getting it to work in PM? It works fine in Chrome and FF.

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 6071
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Night Wing » 2026-03-20, 15:27

The link works in Waterfox and Firefox, but not in Pale Moon. My guess is since it is Google, Google is probably trying to steer users towards it's Chrome browser.
MX Linux 25.2 (Infinity) Xfce w/Pale Moon, Waterfox, Firefox
Linux Debian 13.6 (Trixie) Xfce w/Pale Moon, Waterfox, Firefox

User avatar
MrD2018
Moonbather
Moonbather
Posts: 56
Joined: 2018-07-03, 15:32
Location: United Kingdom

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by MrD2018 » 2026-03-23, 17:57

The Google AI requires support for TextDecoderStream which Pale Moon does not have. I have found that using a Greasemonkey script to substitute the TextDecoderStream decoder with TextDecoder fixes the problem.

User avatar
BopBe
Apollo supporter
Apollo supporter
Posts: 33
Joined: 2019-08-21, 19:59

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by BopBe » 2026-03-24, 17:25

MrD2018 wrote:
2026-03-23, 17:57
The Google AI requires support for TextDecoderStream which Pale Moon does not have. I have found that using a Greasemonkey script to substitute the TextDecoderStream decoder with TextDecoder fixes the problem.
Share the script please. I miss google's AI summary for short computer related questions.

User avatar
MrD2018
Moonbather
Moonbather
Posts: 56
Joined: 2018-07-03, 15:32
Location: United Kingdom

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by MrD2018 » 2026-03-25, 20:36

Below is the code I have used. It is just a work in progress, but it does restore the AI feature. I have had to update it a couple of times as Google have kept changing their script, altering some of the variable names, so this could happen again.

Code: Select all

// ==UserScript==
// @name        Google Script Rewriter
// @namespace   name
// @include     https://www.google.com/search*
// @run-at      document-start
// @version     1
// @grant       none
// ==/UserScript==

(function() {

    var observer = new MutationObserver(mutations => {
        for (var m of mutations) {
            for (var node of m.addedNodes) {

                if (node.tagName === "SCRIPT" && node.textContent.includes("pipeThrough")) {

                    // removes TextDecoderStream
                    node.textContent = node.textContent.replace(
                        ".pipeThrough(new TextDecoderStream)",
                        ""                        
                    );

                  //adds TextDecoder
                  node.textContent = node.textContent.replace(
                        "await a.B.read();",
                        "await a.B.read();var dd = new TextDecoder().decode(d);d=dd;"
                    );

                    //makes d a variable
                    node.textContent = node.textContent.replace(
                        "const {value:d",
                        "var {value:d"
                    );
                                        
                    //stop AI Overview section from being deleted
                    node.textContent = node.textContent.replace(
                        "for(let f=a.firstChild;f!==e;f=a.firstChild)a.removeChild(f)",
                        "/*for(let f=a.firstChild;f!==e;f=a.firstChild)a.removeChild(f)*/"
                    );
                    
                    var clone = document.createElement("script");
                    clone.textContent = node.textContent;
                    node.replaceWith(clone);
                }
            }
        }
    });

    observer.observe(document.documentElement, {
        childList: true,
        subtree: true
    });

})();

User avatar
Mæstro
Board Warrior
Board Warrior
Posts: 1288
Joined: 2019-08-13, 00:30
Location: Casumia

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Mæstro » 2026-03-26, 00:30

I should consider the plagiarised spam failing to appear as a feature, not a bug, and stop using Google anyway. ;)
I think a statement like this is in order after several others have successfully helped OP in his stated purposes.
Life is a fever dream Mæstro would enjoy.
All posts 100% organic. Ash is the best letter.
What is being nice online?
Debian 10 ELTS / Official PM build

User avatar
BopBe
Apollo supporter
Apollo supporter
Posts: 33
Joined: 2019-08-21, 19:59

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by BopBe » 2026-04-06, 13:36

MrD2018 wrote:
2026-03-25, 20:36
Below is the code I have used. It is just a work in progress, but it does restore the AI feature. I have had to update it a couple of times as Google have kept changing their script, altering some of the variable names, so this could happen again.
It has some duplicate elements rendering bug but it's a major step up from having nothing. Cheers mate, appreciate it. And sorry for the very, very late reply.

Harkonnen
Fanatic
Fanatic
Posts: 104
Joined: 2014-11-04, 12:27
Location: Kiev, Ukraine

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Harkonnen » 2026-04-19, 23:16

MrD2018 wrote:
2026-03-25, 20:36
Below is the code I have used. It is just a work in progress, but it does restore the AI feature. I have had to update it a couple of times as Google have kept changing their script, altering some of the variable names, so this could happen again.
This piece of code worked for a few weeks, but as of two days ago the AI frame goes "searching" then "thinking a little longer" and gets stuck here, error console contains bunch of "Empty string passed to getElementById()."

User avatar
MrD2018
Moonbather
Moonbather
Posts: 56
Joined: 2018-07-03, 15:32
Location: United Kingdom

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by MrD2018 » 2026-04-19, 23:26

swap out the code

Code: Select all

node.textContent = node.textContent.replace(
                        "for(let f=a.firstChild;f!==e;f=a.firstChild)a.removeChild(f)",
                        "/*for(let f=a.firstChild;f!==e;f=a.firstChild)a.removeChild(f)*/"
with

Code: Select all

node.textContent = node.textContent.replace(
                        "for(let e=a.firstChild;e!==f;e=a.firstChild)a.removeChild(e)",
                        "/*for(let e=a.firstChild;e!==f;e=a.firstChild)a.removeChild(e)*/"
and it should get it working again. Google had changed some variable names. I will try to make a more future proofed version.

Harkonnen
Fanatic
Fanatic
Posts: 104
Joined: 2014-11-04, 12:27
Location: Kiev, Ukraine

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Harkonnen » 2026-04-25, 13:36

MrD2018 wrote:
2026-04-19, 23:26

Code: Select all

node.textContent = node.textContent.replace(
                        "for(let e=a.firstChild;e!==f;e=a.firstChild)a.removeChild(e)",
                        "/*for(let e=a.firstChild;e!==f;e=a.firstChild)a.removeChild(e)*/"
and it should get it working again. Google had changed some variable names. I will try to make a more future proofed version.
LOL, its not working again with "Empty string passed to getElementById()." Google is changing that fucking code like every day....

User avatar
MrD2018
Moonbather
Moonbather
Posts: 56
Joined: 2018-07-03, 15:32
Location: United Kingdom

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by MrD2018 » 2026-04-25, 14:01

The variable names got changed back to what they were before so the old version would probably have worked again but I have updated the code so that any further name changes should be caught. Here's the whole block again -

Code: Select all

// ==UserScript==
// @name        Google Script Rewriter
// @namespace   name
// @include     https://www.google.com/search*
// @run-at      document-start
// @version     1
// @grant       none
// ==/UserScript==

(function() {

    var observer = new MutationObserver(mutations => {
        for (var m of mutations) {
            for (var node of m.addedNodes) {
                
                if (node.tagName === "SCRIPT" && node.textContent.includes("pipeThrough")) {
                   
                    // removes TextDecoderStream
                    node.textContent = node.textContent.replace(
                        ".pipeThrough(new TextDecoderStream)",
                        ""                        
                    );
                    
                  //adds TextDecoder
                  node.textContent = node.textContent.replace(
                        "await a.B.read();",                        
                        "await a.B.read();var dd = new TextDecoder().decode(d);d=dd;"                    
                    );

                    //makes d a variable
                    node.textContent = node.textContent.replace(
                        "const {value:d",
                        "var {value:d"
                    );
                                        
                    //stop AI Overview section from being deleted
                     node.textContent = node.textContent.replace(
                        /for\(let\s+(\w+)\s*=\s*a\.firstChild;\s*\1\s*!==\s*(\w+);\s*\1\s*=\s*a\.firstChild\)\s*a\.removeChild\(\1\)/,
                        "/*$&*/"   
                        
                    );
                    
                    // Replace the node so the modified version executes
                    var clone = document.createElement("script");
                    clone.textContent = node.textContent;
                    node.replaceWith(clone);
                }
            }
        }
    });

    observer.observe(document.documentElement, {
        childList: true,
        subtree: true
    });

})();

xtal256
Moon lover
Moon lover
Posts: 98
Joined: 2014-06-22, 00:32
Location: here

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by xtal256 » 2026-05-01, 00:31

Those look like "minified" names (i.e. the actual variable names get replaced by single letter names to reduce code size) so it's unlikely that Google keep changing them and more likely that any code change they do results in the minification process semi-randomly picking a name.

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 709
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Basilisk-Dev » 2026-05-01, 13:57

Just add a TextDecoderStream polyfill to Greasemonkey. Then you don't have to worry about the variable names changing because you would be fixing the issue regardless of the variable names.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

Goodydino
Keeps coming back
Keeps coming back
Posts: 981
Joined: 2017-10-10, 21:20

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Goodydino » 2026-05-02, 18:37

Do all of the AI search engines have the same basic problem? I have five of them working with LibreWolf, two work with Waterfox, two with Vivaldi (one of them not the same), all work with Safari, and none work with Pale Moon or SeaMonkey.

User avatar
Mæstro
Board Warrior
Board Warrior
Posts: 1288
Joined: 2019-08-13, 00:30
Location: Casumia

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Mæstro » 2026-05-02, 22:19

In general, I should expect that LLM antifeatures are developed by men who show little regard for the interests of diverse parties such as independent browser developers. Google-owned sites show a long history of disagreeing with our browser.
Life is a fever dream Mæstro would enjoy.
All posts 100% organic. Ash is the best letter.
What is being nice online?
Debian 10 ELTS / Official PM build

Harkonnen
Fanatic
Fanatic
Posts: 104
Joined: 2014-11-04, 12:27
Location: Kiev, Ukraine

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Harkonnen » 2026-05-24, 10:09

MrD2018 wrote:
2026-04-25, 14:01
The variable names got changed back to what they were before so the old version would probably have worked again but I have updated the code so that any further name changes should be caught. Here's the whole block again -
And it stopped working again.... :(

User avatar
MrD2018
Moonbather
Moonbather
Posts: 56
Joined: 2018-07-03, 15:32
Location: United Kingdom

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by MrD2018 » 2026-05-26, 19:00

It looks like Google modified the code again and changed more than just some variable names as I can no longer get it to work through a Greasemonkey script. I tried the TextDecoderStream polyfill but I could not get it to work either. I have however managed to get a filter working using the Modify HTTP Response extension. Here is the filter to use -

Code: Select all

[["www.google.com",["/search\\?q.*/",[".pipeThrough(new TextDecoderStream)","","await b.read();","await b.read();var dd = new TextDecoder().decode(k);k=dd;"]]]]
Also, now it does not seem to suffer from the duplicating problem that was happening before but that could change if Google messes about with the code again.

Can I ask why TextDecoderStream and other parts of the Streams API have not been added to Pale Moon yet as many websites seem to need it now. Is it quite complex to implement or is there another reason?

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1940
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by athenian200 » 2026-05-26, 19:16

MrD2018 wrote:
2026-05-26, 19:00
Can I ask why TextDecoderStream and other parts of the Streams API have not been added to Pale Moon yet as many websites seem to need it now. Is it quite complex to implement or is there another reason?
As far as I can tell, it's because for a long time it wasn't used by that many websites and stuff using the Steams API is hitting all at once, like almost right around the beginning of this year. I have a friend IRL that needs a site that uses TransformStream, another part of that API, and can't/won't use any browser besides Pale Moon... so they are waiting to use the site until we fix it. I'm just reluctant to work on it because there's so much junk in the tree that has never been in a release right now that I'm afraid to pile more on. There's been a ton of development in a short time, and master has diverged from release to an uncomfortable degree.
"Linux makes everything difficult." -- Lyceus Anubite
"Linux is a cancer that attaches itself in an intellectual property sense to everything it touches. That's the way that the license works." -- Steve Ballmer
"We always overestimate the change that will occur in the next two years and underestimate the change that will occur in ten." -- Bill Gates

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 709
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by Basilisk-Dev » 2026-05-27, 01:19

athenian200 wrote:
2026-05-26, 19:16
I'm just reluctant to work on it because there's so much junk in the tree that has never been in a release right now that I'm afraid to pile more on. There's been a ton of development in a short time, and master has diverged from release to an uncomfortable degree.
Planning on working on this (and some other Stream functions) in the next 1-3 weeks.

In the meantime, the polyfills I currently ship in Basilisk for the various stream functions can be used within GreaseMonkey on Pale Moon, I mentioned polyfills already once earlier in the thread. I tested and they fully work with ChatGPT, Google's built in AI feature, and some other work sites I use. They are not site-specific like some of the other solutions mentioned here and don't depend on specific variable names on web pages.
https://repo.palemoon.org/Basilisk-Dev/ ... ed-scripts
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
browserman
Moongazer
Moongazer
Posts: 9
Joined: 2026-01-06, 16:05

Re: Google's built-in AI is broken in PM: Something went wrong and the content wasn't generated.

Post by browserman » 2026-05-30, 20:00

Night Wing wrote:
2026-03-20, 15:27
The link works in Waterfox and Firefox, but not in Pale Moon. My guess is since it is Google, Google is probably trying to steer users towards it's Chrome browser.
My "guess" is that Google et al are actively using (seeking) missing functionality in too independent browsers or inventing new, to be sure nothing will be comfortable outside their browser kingdom. I've noticed too many times PM working fine for a while, and then some function here and there starts malfunction until PM devs rebounds with new code. It may be a single button stop working, or something else, especially when doing banking.