serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibWeb: Compatible with ChatGPT

Open awesomekling opened this issue 1 year ago • 5 comments

We should figure out what's missing for ChatGPT compatibility and implement it.

https://chat.openai.com/

At the moment, we're not even passing the Cloudflare turnstile challenge (at least not where I'm connecting from)

awesomekling avatar Dec 03 '23 15:12 awesomekling

The last I looked at this, we failed to load a blob url in a worker. It also complained about cookies.

Both of which sound like things @Lubrsi is familiar with ;)

ADKaster avatar Dec 09 '23 21:12 ADKaster

Commenting out this code makes it no longer complain about enabling cookies: https://github.com/SerenityOS/serenity/blob/6b79508c08abaef3da3717e250993d622af65b6e/Userland/Libraries/LibWebView/CookieJar.cpp#L320-L331 cc @trflynn89

Lubrsi avatar Dec 11 '23 19:12 Lubrsi

The last I looked at this, we failed to load a blob url in a worker.

With our process architecture for workers (being in a separate process), we'll have to follow spec and implement blob URLs as a global user agent store (i.e. in the browser process)

Lubrsi avatar Dec 11 '23 19:12 Lubrsi

Commenting out this code makes it no longer complain about enabling cookies:

Looks like cookie.domain is the empty string, and is_public_suffix(<empty string>) always returns true.

The public suffix list uses AK::Trie to store its data. Seems like the construction of that thing is more or less copy-pasted from TestTrie.cpp:

https://github.com/SerenityOS/serenity/blob/6e19ab2bbce0b113b628e6f8e9b5c0640053933e/Tests/AK/TestTrie.cpp#L14-L20

That test trie also successfully "finds" an empty string. Is that expected with the trie? Or are we constructing the trie wrong?

trflynn89 avatar Dec 11 '23 20:12 trflynn89

image Looks like it is working for me - although login is problematic for me still.

shannonbooth avatar May 25 '24 23:05 shannonbooth