mozilla / nightlytt

Nightly Tester Tools
https://wiki.mozilla.org/Auto-tools/Automation_Development/Projects/Addons/NightlyTesterTools
Other
62 stars 37 forks source link

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

Closed whimboo closed 7 years ago

whimboo commented 12 years ago

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

xabolcs commented 12 years ago

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?

whimboo commented 12 years ago

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?

xabolcs commented 12 years ago

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. :)

whimboo commented 12 years ago

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

xabolcs commented 12 years ago

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/

xabolcs commented 12 years ago

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!

xabolcs commented 12 years ago

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.

xabolcs commented 12 years ago

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.

qguv commented 10 years ago

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

xabolcs commented 10 years ago

@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.

Endor8 commented 8 years ago

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

whimboo commented 8 years ago

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

whimboo commented 8 years ago

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.

xabolcs commented 8 years ago

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

whimboo commented 8 years ago

@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.

whimboo commented 8 years ago

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

whimboo commented 7 years ago

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.

xabolcs commented 7 years ago

Follow up issue is #251.