Comments (7)
That request suggests that you are trying to use port 80 for the callback, which most likely won't work due to how linux port binding works (ossapi spins up its own server to accept the token callback). Try a port above 1024, which should be linux user bindable.
from ossapi.
I now tried it with the example port and several other ports but I still get the same result. I also made sure to update the information in the code and on osu accordingly
from ossapi.
I'm not entirely sure how remoting into an aws server works or how you are accessing the webpage , so it's hard for me to offer specific advice. But maybe it will help you debug if I describe the flow ossapi goes through:
ossapi = Ossapi(client_id, client_secret, redirect_url)
is called- ossapi opens an oauth page on osu.ppy.sh using
webbrowser.open
.- I don't know what this defaults to on aws or linux.
- ossapi opens a socket on the localhost port specified in
redirect_url
. - when you click "authenticate" in your browser on the oauth page opened in step 2, you are redirected to the port on localhost, where ossapi receives your credentials in the http GET headers of that request.
This process could be failing at a few places here. It may be up to you to determine which step, or provide more info.
from ossapi.
I'm going to close this for now, but feel free to comment with more information and I'll try to help as best I can! Who knows - we might have a real bug here, or something ossapi can do better.
from ossapi.
So I looked into it again and Ive tried two things:
I created a new instance with windows using the same security rules.
I started a webserver myself on the port to see if I can even open and access the webserver using the port.
First the windows one surprisingly works fine which is good and does proof that my aws settings should support opening ports.
The webserver that I started also worked fine and I had full access on it.
It does seem like that the way ossapi opens the socket isnt compatible with amazon linux for some reason.
I ran the webserver with this command: "python3 -m http.server 3914 --directory ~/folder".
from ossapi.
Thanks for the update.
I wonder if changing ossapi to use serversocket.bind(("127.0.0.1", port))
instead of serversocket.bind(("localhost", port))
would make a difference here.
from ossapi.
it doesnt hurt to try...
from ossapi.
Related Issues (20)
- Getting information for missing user IDs result in unclosed client sessions HOT 1
- Error decoding json response with `OssapiAsync` HOT 7
- Get users functionality not working for async client HOT 1
- Retry `requests` / `aiohttp`-level errors HOT 3
- Beatmap Packs browse support HOT 1
- user scores returns empty list for recent HOT 2
- get-events endpoint HOT 6
- Error on scores with xK mod (mania) HOT 1
- oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client) Client authentication failed HOT 6
- `tournament_ban` is not a valid UserAccountHistoryType HOT 1
- Some beatmap()/beatmap_attributes() variables are returned as int instead of float HOT 1
- beatmap.max_combo always is 0 when calling Ossapi.beatmap() HOT 1
- `beatmap_user_scores` returns generic list of `Score` instead of `BeatmapUserScore` HOT 1
- Rare TypeError when calling `api.events` HOT 1
- Score IDs and endpoint has been changed HOT 3
- Invalid url error HOT 12
- legacy_only not working HOT 2
- help | Getting a user's recent score HOT 3
- Token directory should not default to anything in the installed package HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ossapi.