Giter Club home page Giter Club logo

Comments (6)

fschlegelone avatar fschlegelone commented on July 3, 2024

Have the same problem. Also on Firefox

Uncaught SyntaxError: await is only valid in async functions, async generators and modules

But additionally there are hundreds of warnings saying fetch failed:

Source map error: NetworkError when attempting to fetch resource. Resource URL: https://abs.twimg.com/responsive-web/client-web/shared~loader.DMDrawer~bundle.ReaderMode~bundle.DirectMessages~bundle.DMRichTextCompose~bundle.TweetMediaDeta.26b9201a.js Source Map URL: https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/shared~loader.DMDrawer~bundle.ReaderMode~bundle.DirectMessages~bundle.DMRichTextCompose~bundle.TweetMediaDeta.26b9201a.js.map

OS: MacOS
CPU: ARM64 / aarch64
Browser: Firefox-Developer-Edition

from deletetweets.

razrunelord avatar razrunelord commented on July 3, 2024

Same error as well but am running via Node.js

from deletetweets.

schdie avatar schdie commented on July 3, 2024

In order for this to work on firefox besides wrapping it on an async function like @azrogers points out is necessary to replace navigator.userAgentData (which it's not supported) with something like navigator.userAgent but for those who just want to run the script you can replace the line that starts with var ua = with:
var ua = "Mozilla/5.0 (X11; Linux x86_64; rv:121.1) Gecko/20100101 Firefox/121.1"; or whatever user-agent your browser has.

from deletetweets.

UsernamesLame avatar UsernamesLame commented on July 3, 2024

In order for this to work on firefox besides wrapping it on an async function like @azrogers points out is necessary to replace navigator.userAgentData (which it's not supported) with something like navigator.userAgent but for those who just want to run the script you can replace the line that starts with var ua = with: var ua = "Mozilla/5.0 (X11; Linux x86_64; rv:121.1) Gecko/20100101 Firefox/121.1"; or whatever user-agent your browser has.

Unfortunately this doesn't fix it in FireFox 123.0.1 x64 Windows 10

from deletetweets.

schdie avatar schdie commented on July 3, 2024

In order for this to work on firefox besides wrapping it on an async function like @azrogers points out is necessary to replace navigator.userAgentData (which it's not supported) with something like navigator.userAgent but for those who just want to run the script you can replace the line that starts with var ua = with: var ua = "Mozilla/5.0 (X11; Linux x86_64; rv:121.1) Gecko/20100101 Firefox/121.1"; or whatever user-agent your browser has.

Unfortunately this doesn't fix it in FireFox 123.0.1 x64 Windows 10

Are you sure the problem is the user-agent string? Try changing the same line to: var ua = navigator.userAgent; it should work.

from deletetweets.

LoLei avatar LoLei commented on July 3, 2024

For me it worked using an IIFE, see here.

(async function main () {
    // Paste the entire code here
})();

from deletetweets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.