Page 1 of 1

upload to discourse forum https://community.jitsi.org

Posted: 2022-03-02, 08:37
by mmouse
Hello

Error when trying to upload a file.

I guess it's more of a compatibilty with a software than a website, I tested with discuss.linuxcontainers.org (that seems to use a different version than community.jitsi.org) and it's the same.
To reproduce it's necessary to be logged in (registration is free)
Create a new topic and hit the upload button. Select a file (text file, image...) and try to upload.
The forum software replies: Sorry, there was an error uploading that file. Please try again.

Firefox has no problem with that.

Code: Select all

unreachable code after return statement[Learn More]  
vendor-1dcf70c5a3dcb442983c7041a79f657d.br.js:4631
[Uppy] [09:04:36] Failed to upload aa2.png queueMicrotask is not defined  
chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:122820
	error https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:122820
	value https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:112797
	pe https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:116148
	ye/< https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:117954
	[9329]/e.exports/e.emit/< https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:263013
	[9329]/e.exports/e.emit https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:262947
	value https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:100586
	onError https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:42934
	Z https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:37088
	e/< https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:36777
	m https://aws1.discourse-cdn.com/business4/assets/vendor-1dcf70c5a3dcb442983c7041a79f657d.br.js:83:136
	h/a._invoke</< https://aws1.discourse-cdn.com/business4/assets/vendor-1dcf70c5a3dcb442983c7041a79f657d.br.js:80:22
	v/</e[t] https://aws1.discourse-cdn.com/business4/assets/vendor-1dcf70c5a3dcb442983c7041a79f657d.br.js:83:313
	i https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:26835
	s https://aws1.discourse-cdn.com/business4/assets/chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:27042
[Uppy] [09:15:36] Failed to upload aa2.png queueMicrotask is not defined  
chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:122820
[Uppy] [09:35:09] Failed to upload aa2.png queueMicrotask is not defined  
chunk.529.6ee9018498e97f872147-248a6f3ff1492f6e27f3e7b6d099d3b4.br.js:2:122820

Re: upload to discourse forum https://community.jitsi.org

Posted: 2022-03-02, 08:46
by Kris_88
Try this solution for the queueMicrotask function.
viewtopic.php?f=70&t=27860#p223953
Of course you need to replace godbolt.org with the community.jitsi.org (2 places).

Re: upload to discourse forum https://community.jitsi.org

Posted: 2022-03-13, 17:28
by mmouse
Thanks Kris_88

I installed GreaseMonkey from Github as referenced by Moonbat, created a new script in GreaseMonkey, added the source taken from your post and just had to change the site name and add a /* to the @include generated by GreaseMonkey and everything works again. Great help.

Code: Select all

// ==UserScript==
// @name        jitsi community site
// @namespace   cestmonespacedenom
// @include     https://community.jitsi.org/*
// @version     1
// @grant       none
// ==/UserScript==
if(window.location.hostname == 'community.jitsi.org') {
  if (typeof window.queueMicrotask !== "function") 
    window.queueMicrotask = function (callback) {
      Promise.resolve()
        .then(callback)
        .catch(e => setTimeout(() => { throw e; })); // report exceptions
    };
};


Re: upload to discourse forum https://community.jitsi.org

Posted: 2022-03-18, 18:18
by mmouse
Well, it turns out that after the upgrade to Palemoon 30.0, GreaseMonkey is not necessary anymore. Thanks Moonchild !

Re: upload to discourse forum https://community.jitsi.org

Posted: 2022-03-21, 00:11
by moonbat
mmouse wrote:
2022-03-18, 18:18
GreaseMonkey is not necessary anymore
For this particular problem. It's a useful and powerful extension to have even otherwise, and you can install scripts for modifying the look/behavior of different sites from Greasyfork.
I use this one to fix Youtube compatibility and use smaller fonts/thumbnails so I can see more details.

Re: upload to discourse forum https://community.jitsi.org

Posted: 2022-05-14, 07:37
by mmouse
moonbat wrote:
2022-03-21, 00:11
mmouse wrote:
2022-03-18, 18:18
GreaseMonkey is not necessary anymore
For this particular problem. It's a useful and powerful extension to have even otherwise,
Indeed, I have kept it but I don't currently use it.

Re: upload to discourse forum https://community.jitsi.org

Posted: 2022-05-15, 07:03
by moonbat
You can find Greasemonkey scripts for different sites on Greasyfork. Similar extension, but for applying CSS to separate sites, is Stylem, and corresponding styles can be got from Userstyles.