Giter Club home page Giter Club logo

Comments (3)

mickael9 avatar mickael9 commented on August 20, 2024 1

There's no way it wouldn't fail later in the process anyway, since the zip file is opened and info.json is read before the zip gets saved.

Anyway, I added some proper error messages for both the "already logged in with no game ownership" and also added the require_ownership=true parameter which the game uses on login. This is what it looks like now:

$ fac install yarm
Installing: YARM 0.7.107...
Downloading: https://mods.factorio.com/api/downloads/data/mods/187/YARM_0.7.107.zip...
Authentification error when downloading mod. Please login again.
You need a Factorio account to download mods.
Please provide your username and password to authenticate yourself.
Your username and token (NOT your password) will be stored so that you only have to enter it once
This uses the exact same method used by Factorio itself

Username [mickael9-test]:  
Password (not shown):
Ownership error: Your factorio account doesn't own the game.
Please buy the game or link your Steam account if you have bought the game from Steam.

from fac.

mickael9 avatar mickael9 commented on August 20, 2024

You can use -v for requests debugging :)

I'm not having this issue, I suspect the 403 error is because your token or username is invalid (from player-data.json)
Are you able to download mods from the game?

Anyway, I'll add some error handling so that invalid error codes are raised as HTTPError

from fac.

Arnavion avatar Arnavion commented on August 20, 2024

See edit to the OP :)

Anyway, I'll add some error handling so that invalid error codes are raised as HTTPError

Yeah, that's what I was asking for. Otherwise there's the possibility a non-200 response has the same content length as the actual mod file, and fac install won't notice.

from fac.

Related Issues (15)

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.