mProjectsCode / obsidian-media-db-plugin

A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.
GNU General Public License v3.0
243 stars 28 forks source link

Steam API Returns Nothing #120

Closed ggennrich closed 5 months ago

ggennrich commented 8 months ago

Describe the bug Using the Steam API it will search and return results, however, clicking on a result to see the sample data returns nothing with a 302 error notification

To Reproduce Steps to reproduce the behavior:

  1. Go to plugin command view
  2. Click on 'Add new Media DB entry'
  3. Enter in a title
  4. Select Steam API
  5. Click Search
  6. See results and click on one
  7. No output

Expected behavior Selecting a game result should populate the data preview so that you can add a note

Screenshots

Occurs on

Plugin version 0.6.0

Additional context Add any other context about the problem here.

ltctceplrm commented 8 months ago

Huh I can confirm the bug, it's strange because on PC it works fine. I don't see why it would give a redirect error

ltctceplrm commented 8 months ago

The console on android returns this:

plugin:obsidian-media-db-plugin:29 MDB | api "SteamAPI" queried by Title plugin:obsidian-media-db-plugin:29 MDB | api "SteamAPI" queried by ID plugin:obsidian-media-db-plugin:34 Error: MDB | Received status code 302 from an API. at Ei.getById (plugin:obsidian-media-db-plugin:29:16127) at async wi.queryDetailedInfo (plugin:obsidian-media-db-plugin:28:634) at async qi.queryDetails (plugin:obsidian-media-db-plugin:34:11070) at async eval (plugin:obsidian-media-db-plugin:34:10402) at async Wi.openSelectModal (plugin:obsidian-media-db-plugin:34:5568) at async qi.createEntryWithAdvancedSearchModal (plugin:obsidian-media-db-plugin:34:10341) queryDetails @ plugin:obsidian-media-db-plugin:34 await in queryDetails (async) eval @ plugin:obsidian-media-db-plugin:34 openSelectModal @ plugin:obsidian-media-db-plugin:34 await in openSelectModal (async) createEntryWithAdvancedSearchModal @ plugin:obsidian-media-db-plugin:34 await in createEntryWithAdvancedSearchModal (async) eval @ plugin:obsidian-media-db-plugin:34 (anonymous) @ app.js:1 e.handleEvent @ app.js:1

ltctceplrm commented 7 months ago

I'm digging a bit deeper into this and it seems like it's a CORS issue but unfortunately that's outside of my league so someone else will have to fix it.

blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Edit: It doesn't seem to be a CORS issue

mProjectsCode commented 5 months ago

I can't reproduce this issue in my testing.

Anarchtism commented 3 months ago

I also have this issue on Android. No problem on Windows. I wonder what the cause is.