Tampermonkey/tampermonkey

[Safari] GM_xmlhttpRequest does not use browser cookie?

robbielj opened this issue · 9 comments

Specifications

  • Safari: 13.0.2
  • TM: 4.9.6055
  • OS: mac os 10.15

I have observed that tampermonkey has a separated process (Tampermonkey (Safari)) for sending out requests. User agents differ from Safari as well. This is the reason why requests do not embed browser cookie anymore like before.

I tried setting headers for GM_xmlhttpRequest to include cookie however request cannot even be sent. Not sure whether this is fixable or there is some workaround.

4.10.6103 should fix setting headers of GM_xmlhttpRequest

Firefox has similar issue. Hope it can be fixed in the next release.

Firefox has similar issue. Hope it can be fixed in the next release.

+1

@ivysrono @machsix This is issue is in no way related to Firefox, because there are major architectural differences.
If you can reproduce your issue at Tampermonkey Firefox BETA (#816) then please create a new issue and attach a script to reproduce the issue. Thanks.

@derjanb I can still replicate the issue with the current beta (4.10.6112) under Firefox. If needed, I'll try to create an example test case (I'll have to find a test website that'll properly work with cookies), but the issue is that cookies aren't sent for websites that need them (in my case, Instagram), with GM_xmlhttpRequest.

@qsniyg This issue is special to Safari (which has no version 4.10.6112). So please create a new issue. A example test case would be great. Thanks.

Not fixed?
GM_xmlhttpRequest does not attach cookie still.

@derjanb As I understand it's because Safari APIs and there is no workaround?

I don't have Mac, but one user reported that cookies are not sent on:

  • Safari: 15.0
  • TM: 4.13.6140

The issue still exists.

  • Safari: 15.6.1
  • TM: 4.17.6162