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

Already on GitHub? Sign in to your account

copy about:support to pastebin menu entry is broken #86

Closed
whimboo opened this Issue Jun 12, 2012 · 18 comments

Comments

Projects
None yet
4 participants
Contributor

whimboo commented Jun 12, 2012

When you try the above mentioned command you will get the following entry in the Error Console:

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.loadURI]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/bindings/browser.xml :: loadURIWithFlags :: line 156" data: no]
Source File: chrome://browser/content/tabbrowser.xml
Line: 1358

Collaborator

xabolcs commented Jun 12, 2012

with Firefox 12 (Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0 ID:20120417165043) the new tab would open with THIS API HAS BEEN DISABLED. Please use Pastebin's new API. http://pastebin.com/api "URL" which causes the exception.

But http://pastebin.com/api redirects to the login page. Do we like that (read: login required services)? :(
Are there any way to use pastebin.m.o instead?

Contributor

whimboo commented Jun 12, 2012

For Firefox and SeaMonkey we could use loadURI and simply submit the data via the postData parameter:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#2142

But not sure if that would work in Thunderbird.

Would you mind posting a link to our current source?

Collaborator

xabolcs commented Jun 12, 2012

Related Pastebin.com tweet is below:

Today we disabled Pastebin's old API. Right now only the new API works. Please adjust your apps/tools if you haven't already.

whimboo wrote:

Would you mind posting a link to our current source?

pastebin() is at nightly.js#L229. It operates with xhr.
Could be easily tested with Error Console - copy body of pastebin() and let go. :)

Contributor

whimboo commented Jun 12, 2012

I would say lets try it out with our own pastebin version at mozilla.org.

Collaborator

xabolcs commented Jun 12, 2012

Sad news from google about pastebin.m.o: Bug 610766 is RESOLVED WORKFORME.

But at least it provides alternatives: https://github.com/bartTC/django-paste, https://github.com/oremj/pastebinit/

Collaborator

xabolcs commented Jun 12, 2012

dpaste.de / dpaste.com works with the new FormData() introduced in Gecko 2.0. So I hope new MultipartFormData()could do the trick too. :)

I'm wondering that multipartFormData.js from screenshot directory should be a shared module. Hm?
Updated nightly.pastebin() will use it too!

Collaborator

xabolcs commented Aug 9, 2012

Good news: I'm able to send to pastebin.m.o with XHR (as nightly.pastebin() does) and new MultipartFormData().
Bad news: pastebin.m.o doesn't like current implementation of MultipartFormData and delays the response with 60 seconds!

A request with FormData:

    Fd is instance of MultipartFormData: false
    Fd is instance of FormData: true
    Xhr sent to http://pastebin.mozilla.org/
    Xhr changed state to 2 in 870ms
    Xhr changed state to 3 in 870ms
    Xhr changed state to 3 in 876ms
    Xhr changed state to 3 in 876ms
    Xhr changed state to 3 in 879ms
    http://pastebin.mozilla.org/1746450
    Xhr done in 879ms

A request with NTT's own MultipartFormData:

    Fd is instance of MultipartFormData: true
    Fd is instance of FormData: false
    Xhr sent to http://pastebin.mozilla.org/
    Xhr changed state to 2 in 61012ms
    Xhr changed state to 3 in 61012ms
    Xhr changed state to 3 in 61012ms
    Xhr changed state to 3 in 61015ms
    http://pastebin.mozilla.org/1746451
    Xhr done in 61015ms

Hey pastebin, wtf R U doin?

I'm going to dig into this, and try to improve MultipartFormData. I wouldn't like drop it due to compatibility reasons.

Collaborator

xabolcs commented Aug 10, 2012

Interestingly MultipartFormData works flawlessly with pastebin.m.o under Gecko 1.9.x
Other trivial XHR implemetations are slowed down too (under recent Applications).
A workaround is for example to create the <form/> element and submitting that.
But that doesn't work well with Thunderbird.

So I used FormData where possible, and falled back to MultipartFormData otherwise.
The fallback case could be improved if MultipartFormData got modularized or reverted back to Component.

xabolcs added a commit to xabolcs/nightlytt that referenced this issue Aug 10, 2012

Issue #86 - use pastebin.m.o with FormData where applicable.
Other improvements: disable menuitem while sending, Thunderbird support.

@ghost ghost assigned xabolcs Aug 24, 2012

xabolcs added a commit to xabolcs/nightlytt that referenced this issue Oct 19, 2012

Issue #86 - addressing comments, part 1:
- onErrorCallback
- const pastebinURL
- triple operator 200
- pastebinAboutSupport space
- import multipartFormData.js

xabolcs added a commit to xabolcs/nightlytt that referenced this issue Oct 19, 2012

Issue #86 - addressing comments, part 1.5:
- refresh pastebin() call in pastebinAboutSupport

qguv commented Feb 7, 2014

I'm experiencing the same issue @xabolcs got 2 years ago:
THIS API HAS BEEN DISABLED. Please use Pastebin's new API. http://pastebin.com/api

Collaborator

xabolcs commented Feb 9, 2014

@qguv if you are interested, you could try the xpi from development channel! It have a fix, which uses pastebin.mozilla.org instead pastebin.com.

@xabolcs xabolcs added this to the 3.8 milestone Apr 30, 2014

@whimboo whimboo modified the milestones: 3.8, 3.9 Aug 18, 2016

Endor8 commented Aug 22, 2016

Since the pastebin issue is apparently well know since 2012 it would be
good if someone fix it finally.
Thanks

Contributor

whimboo commented Aug 22, 2016

Yes, it bugs us for a while now. Lets try to get this fixed for the next 3.9 release.

xabolcs added a commit to xabolcs/nightlytt that referenced this issue Aug 27, 2016

xabolcs added a commit to xabolcs/nightlytt that referenced this issue Aug 27, 2016

Contributor

whimboo commented Aug 29, 2016

I think the patch is close to be ready to land. @xabolcs do you agree? Would be great to see it in the 3.9 release.

Collaborator

xabolcs commented Aug 29, 2016

I do agree! I will have some minor questions in the PR.

xabolcs added a commit to xabolcs/nightlytt that referenced this issue Aug 29, 2016

xabolcs added a commit to xabolcs/nightlytt that referenced this issue Sep 7, 2016

Contributor

whimboo commented Oct 7, 2016

@xabolcs quick ping. Do you think you will have the time to work on this issue? If not we might want to get this pushed out to a later release so that we can finally get out 3.9. Thanks.

Contributor

whimboo commented Oct 12, 2016

It looks like that @xabolcs is not around those days. I will move out this issue to 3.10 then.

@whimboo whimboo modified the milestones: 3.10, 3.9 Oct 12, 2016

@whimboo whimboo modified the milestone: 3.10 May 15, 2017

Contributor

whimboo commented Sep 14, 2017

We don't have the pastebin feature anymore in the rewrite of the extension and would have to find a new way of doing so.

@whimboo whimboo closed this Sep 14, 2017

Collaborator

xabolcs commented Sep 14, 2017

Follow up issue is #251.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment