ShareX / ShareX

ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
https://getsharex.com
GNU General Public License v3.0
28.11k stars 3.1k forks source link

Url shortening doesn't seem to work anymore in 9.8 #576

Closed archon810 closed 9 years ago

archon810 commented 9 years ago

I can't seem to shorten any url anymore. I have the shortener set to bit.ly, and it's been working for months/years, but not today.

I've tried Amazon, Verge, and other random urls, and they don't shorten. File upload is fine, gist is fine, but not bit.ly.

The logs just say this: 2015-03-29 16:11:29.739 - Hotkey triggered: Hotkey: Ctrl + Shift + Alt + Page Up, Description: Clipboard Upload, Job: ClipboardUpload

Any ideas?

Jaex commented 9 years ago

Unfortunately I can't reproduce it with getsharex.com shortening: http://bit.ly/1eB7oZ6

Maybe it was temporary server side problem?

archon810 commented 9 years ago

Nope, still happening. How can I help diagnose?

Jaex commented 9 years ago

Did you tried re authenticating to bitly? Also which URL you trying to shorten is not working?

archon810 commented 9 years ago

That was the first thing I did. None of the urls are working, no matter what I try.

Jaex commented 9 years ago

Maybe problem is not to do with bitly but instead your clipboard upload not even doing url shortening? Did you checked this:

archon810 commented 9 years ago

Yes sir. http://i.imgur.com/3SrCsau.png.

That's the weird thing. This used to work for ages. I didn't change anything, then one day, poof.

archon810 commented 9 years ago

Still not working in the latest version :(

Jaex commented 9 years ago

It works for everybody and without be able to reproduce it I can't know why it not works for you. Is it works when you shorten using after upload task instead of clipboard upload? Is other url shorteners works?

archon810 commented 9 years ago

Just tested after upload task - it worked. Shortened the imgur upload to my custom bit.ly one http://andp.lc/1PVCbQY.

archon810 commented 9 years ago

Switching up the url shortener doesn't fix it. I even tried to log into goo.gl and switch to that, and still no reaction when pressing Ctrl+Shift+Alt+PageUp, which is my shortcut for uploading.

Jaex commented 9 years ago

http://i.imgur.com/3SrCsau.png in here you checked first one, how it supposed to shorten? But you didn't told it was instead uploading it too. So how that possible?

archon810 commented 9 years ago

Sorry, I'm confused a bit. Can you explain/rephrase?

Jaex commented 9 years ago

In your config it will download image and re upload it because you checked first setting in that screenshot. So it can't shorten it. But you didn't told me it was uploading anything too so I was not suspicious of it.

archon810 commented 9 years ago

I am not downloading/uploading images. Just random urls, like the one to this thread (https://github.com/ShareX/ShareX/issues/576) or http://www.google.com. The only reason I tested an image just now was because you asked me to test what happens when I check shorten in "after upload task". So I did that and then uploaded an image.

Jaex commented 9 years ago

When first option checked there it not running second option. This includes for third option too. All these 3 options URL jobs therefore if one of them triggered then other not runs.

archon810 commented 9 years ago

This 100% definitely used to work. And I don't see why it shouldn't in this case. The first option is to download and upload if it contains a file URL. Which it doesn't. So it should move on to the next one, which is to shorten a url with a url shortener.

I understand your logic completely, but the keyword is "triggers." In case of google.com, the first rule does not trigger.

Jaex commented 9 years ago

File check happens in separate thread therefore it returns as soon as it is triggered.

archon810 commented 9 years ago

Please reopen this, I don't agree with your resolution.

archon810 commented 9 years ago

But don't you think that this is a bug, especially since it used to work? The fact that there's multithreading and race conditions involved means it's a bug or at least a feature that doesn't work 100%.

Jaex commented 9 years ago

It can't be used to work, I don't remember changing its functionality. And It was kinda intentional why I did this because it will be inconsistent then. I mean if I want to shorten URLs then I would like to shorten every URL, not just non file ones. So I did this on purpose. Only one URL task can run actively for consistency. So it is not bug.

archon810 commented 9 years ago

Then why is this not a radio button but a checkbox? A checkbox implies that all the given choices are optional and multiple can be checked and working?

As for the feature, I can't tell you how it used to work, but I haven't changed any settings and then suddenly after one of the updates, I couldn't shorten anything anymore. I don't understand why it can't just be a waterfall of consecutive if/thens? If first rule matches, do it and break the loop. If not, move on to the next one until something works or you're out of options.

Jaex commented 9 years ago

Reason is there was only one URL task before. Later I added two more and for not reset peoples setting not changed them to radio boxes.

If that way easy like how you telling that "if" should work, I would do it. But there is threads involved therefore I can't just pass to other...

There is reason for everything. I thinked all of these before you ask these.

McoreD commented 9 years ago

Order of triggering should happen in the order of them being listed. If not, this needs to be resolved.

On Wed, 20 May 2015 at 15:00 Jaex notifications@github.com wrote:

Reason is there was only one URL task before. Later I added two more and for not reset peoples setting not changed them to check boxes.

If that way easy like how you telling that if should work, I would do it. But there is threads involved therefore I can't just pass to other...

There is reason for everything. I thinked all of these before you ask these.

— Reply to this email directly or view it on GitHub https://github.com/ShareX/ShareX/issues/576#issuecomment-103782690.

archon810 commented 9 years ago

@McoreD I've given up trying to make a case for fixing this and the fact that it's still buggy behavior to the user. I just unchecked the first box and won't be using the file url upload feature.

McoreD commented 9 years ago

Artem, can I suggest you to kindly create a new Task e.g. Ctrl+Shift+U to specifically shorten URL and turn off everything else that's unnecessary or conflicting?

On Wed, 20 May 2015 at 17:36 Artem Russakovskii notifications@github.com wrote:

@McoreD https://github.com/McoreD I've given up trying to make a case for fixing this and the fact that it's still buggy behavior to the user. I just unchecked the first box and won't be using the file url upload feature.

— Reply to this email directly or view it on GitHub https://github.com/ShareX/ShareX/issues/576#issuecomment-103825073.

RadGH commented 8 years ago

This looks unfortunate. I can't get URL shortening to work automatically either and this ticket is just closed.

I can get it to work if I manually create a short URL (right click a completed task, "shorten url"). I've followed the tips here to no avail.

Here are my settings:

https://dl.dropboxusercontent.com/s/18sudrj3koo8eau/2015-12-01_10-15-38.jpg?dl=0 https://dl.dropboxusercontent.com/s/i1v50bhgrdsmxgf/2015-12-01_10-16-52.jpg?dl=0 https://dl.dropboxusercontent.com/s/tje460juovcltrr/2015-12-01_10-17-06.jpg?dl=0 https://dl.dropboxusercontent.com/s/e2ayrcl676ura1f/2015-12-01_10-17-44.jpg?dl=0 https://dl.dropboxusercontent.com/s/jcgzgpui8thj7ip/2015-12-01_10-21-02.jpg?dl=0

Dropbox and Google (goo.gl) are authenticated. Google uses a Google Apps account if that matters, but I doubt it does.

The hotkey settings are defaults, except I changed Print Screen to do a region capture. The actual settings of each is the same.

When I take a screenshot, the following happens:

  1. Image opens in local editor (I've tried disabling this, but that doesn't fix it).
  2. Image saves to a folder
  3. Image gets uploaded to dropbox
  4. URL goes to clipboard for dropbox

URL never gets shortened. I think it's just skipping the step.

Here is the task list, the one "Shorten URL" was me manually creating a short URL. This worked. It just isn't automatic.

https://dl.dropboxusercontent.com/s/yf29ae6k7thg67l/2015-12-01_10-19-48.jpg?dl=0

Also note, it's not a problem that the short URL isn't being copied. It isn't being generated in the first place. Eg,

https://dl.dropboxusercontent.com/s/tgql30v743xy48p/2015-12-01_10-21-26.jpg?dl=0

Jaex commented 8 years ago

Google URL shortener not allows to shorten Dropbox urls, even in their web site.

RadGH commented 8 years ago

Ah crap. But it worked when I did it manually..? Wait... it didn't work then either!

http://tinyurl.com/pvleqgw

The task for shortening the URL was green. I figured that meant it worked. But I can't copy the short link from that task, only the original. I think that should have said it failed. Any sort of notice that the provider failed would have helped me figure that out. Maybe add a warning or a popup to explain the shortener failed? Or specify that dropbox links can't be shortened by Google? That's a bit edge case I suppose.

Oh well. Doesn't really matter. Now that I got it figured out I'm good to go.

Sorry for the trouble, I didn't know :)

The other providers do work. If the tinyurl link above didn't give it away. hehe