Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ⚠️Imgur upload failed, check dev console #9

Closed
reggybsr opened this issue May 19, 2021 · 9 comments
Closed

Error: ⚠️Imgur upload failed, check dev console #9

reggybsr opened this issue May 19, 2021 · 9 comments
Assignees

Comments

@reggybsr
Copy link

I did everything I needed to do to get the plugin working, but the error still pops up. Why? (I'm not that big of a tech nerd so I don't understand that well, sorry)

@gavvvr
Copy link
Owner

gavvvr commented May 19, 2021

@reggybsr, I am almost sure it fails for the same reason as #8 (check it out, it was reported today too. The problem can appear and disappear, so you can just try again and there are chances it will work)

If it still fails to you, could you please open the developer console (Ctrl/Cmd+Shift+I) and report here the response code and headers of a failed request on a Network tab? The failed one is usually marked with red.
image

@reggybsr
Copy link
Author

@gavvvr here's the headers and response code for one of the failed images. it says it failed to load the response code for every image, though.

image

image

@gavvvr
Copy link
Owner

gavvvr commented May 21, 2021

@reggybsr I do not see response headers here. You probably show the POST request here. If the first one (CORS with http method OPTIONS) failed, the original request does even attempt to be executed. There are 4 failed requests on your screenshot while I guess you only pasted twice.

I just noticed you exposed your client_id. Even though it is not a secret or password I would recommend you to invalidate it and create a new one.
Btw the next time you face an issue with upload, you can check the API status at https://status.imgur.com/. It will probably show a global failure.

@ih8snow
Copy link

ih8snow commented May 29, 2021

I have a similar problem,
does this info help?
Dataview Plugin - Version 0.3.x Loaded
main.ts:30 Loading Note Refactor plugin
main.ts:10 Loading Hotkeys++ plugin
main.ts:23 Image in Editor Plugin is loaded
main.ts:7 loading wikilinks-to-mdlinks plugin...
index.ts:317 Dataview: Parsed all file prefixes (0.001s)
index.ts:182 Dataview task & metadata indices prepared in 3.964s.
main.ts:35 Dataview: Version 0.3.x Loaded
index.ts:338 Dataview: Parsed all file prefixes (0.002s)
index.ts:200 Dataview: Task & metadata parsing queued in 0s.
index.html:1 Access to fetch at 'https://api.imgur.com/3/image.json' from origin 'app://obsidian.md' has been 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.
api.imgur.com/3/image.json:1 Failed to load resource: net::ERR_FAILED
main.ts:147 Failed imgur request: TypeError: Failed to fetch
handleFailedUpload @ main.ts:147

@gavvvr
Copy link
Owner

gavvvr commented Jun 2, 2021

@ih8snow, thanks for adding error log. It confirms that all users face the same problem with CORS sometimes which simply disappears later. And I also faced it once.

What I could do is to fall back to default paste of a file to vault. Just released 1.2.0, closing the issue

@gavvvr gavvvr self-assigned this Jun 2, 2021
@gavvvr gavvvr closed this as completed Jun 2, 2021
@candideu
Copy link

candideu commented Jul 22, 2024

I ran into this same issue today:
image

@thammawat-s
Copy link

I have similar error today.
image

@gavvvr
Copy link
Owner

gavvvr commented Jul 25, 2024

@candideu @thammawat-s there was a global issue affecting everyone (#80). Update the plugin to 2.6.0 and follow new instructions to generate your own Client ID. The plugin should be fixed now. Leave a "thumbs up" reaction, if the update to 2.6.0 fixes your problems.

@candideu
Copy link

candideu commented Aug 9, 2024

@gavvvr Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants