From 3e54e7504037c9be7f1039686fb3569bc077ea2b Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Thu, 17 Jun 2021 15:14:54 +0300 Subject: [PATCH 1/9] Add workaround for #932 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 322f06ba..d24dbb4e 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ Note: on some OSes, you will need to add this line to your `/etc/hosts` file: 127.0.0.1 workadventure.localhost ``` +Note: If on the first run you get a page with "network error". Try to ``docker-compose stop`` , then ``docker-compose start``. + ### MacOS developers, your environment with Vagrant If you are using MacOS, you can increase Docker performance using Vagrant. If you want more explanations, you can read [this medium article](https://medium.com/better-programming/vagrant-to-increase-docker-performance-with-macos-25b354b0c65c). From 120f19af65d4fc81ebe01aaa99dd044aef889394 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Thu, 24 Jun 2021 14:35:18 +0300 Subject: [PATCH 2/9] Add anthoer note for https://github.com/thecodingmachine/workadventure/issues/932#issuecomment-867562208 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d24dbb4e..ba9e70ce 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Note: on some OSes, you will need to add this line to your `/etc/hosts` file: ``` Note: If on the first run you get a page with "network error". Try to ``docker-compose stop`` , then ``docker-compose start``. +Note 2: If you are still getting "network error". Make sure you are authorizing the self-signed certificate by entering https://pusher.workadventure.testing and accepting them. ### MacOS developers, your environment with Vagrant From ae3e2a09d9485e4ed9d704e4659c8b676b783f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=AF=5C=5F=28=E3=83=84=29=5F/=C2=AF?= Date: Mon, 30 Aug 2021 19:32:02 +0200 Subject: [PATCH 3/9] add possibility to set size of coWebsite and Jitsis via map property --- front/src/Phaser/Game/GameScene.ts | 6 ++++-- front/src/WebRtc/CoWebsiteManager.ts | 14 ++++++++++++-- front/src/WebRtc/JitsiFactory.ts | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 7ba97175..1ca52f51 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -835,7 +835,8 @@ export class GameScene extends DirtyScene { newValue as string, this.MapUrlFile, allProps.get("openWebsiteAllowApi") as boolean | undefined, - allProps.get("openWebsitePolicy") as string | undefined + allProps.get("openWebsitePolicy") as string | undefined, + allProps.get("openWebsiteWidth") as number | undefinded ); layoutManagerActionStore.removeAction("openWebsite"); }; @@ -1839,8 +1840,9 @@ ${escapedMessage} "jitsiInterfaceConfig" ); const jitsiUrl = allProps.get("jitsiUrl") as string | undefined; + const jitsiWidth = allProps.get("jitsiWidth") as number | undefined; - jitsiFactory.start(roomName, this.playerName, jwt, jitsiConfig, jitsiInterfaceConfig, jitsiUrl); + jitsiFactory.start(roomName, this.playerName, jwt, jitsiConfig, jitsiInterfaceConfig, jitsiUrl, jitsiWidth); this.connection?.setSilent(true); mediaManager.hideGameOverlay(); diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index f2de3580..f293399c 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -48,6 +48,10 @@ class CoWebsiteManager { this.cowebsiteDiv.style.width = width + "px"; } + set widthPercent(width: number) { + this.cowebsiteDiv.style.width = width + "%"; + } + get height(): number { return this.cowebsiteDiv.clientHeight; } @@ -162,7 +166,7 @@ class CoWebsiteManager { return iframe; } - public loadCoWebsite(url: string, base: string, allowApi?: boolean, allowPolicy?: string): void { + public loadCoWebsite(url: string, base: string, allowApi?: boolean, allowPolicy?: string, widthpercent?: number): void { this.load(); this.cowebsiteMainDom.innerHTML = ``; @@ -186,6 +190,9 @@ class CoWebsiteManager { .then(() => Promise.race([onloadPromise, onTimeoutPromise])) .then(() => { this.open(); + if (widthpercent) { + this.widthpercent = widthpercent; + } setTimeout(() => { this.fire(); }, animationTime); @@ -199,13 +206,16 @@ class CoWebsiteManager { /** * Just like loadCoWebsite but the div can be filled by the user. */ - public insertCoWebsite(callback: (cowebsite: HTMLDivElement) => Promise): void { + public insertCoWebsite(callback: (cowebsite: HTMLDivElement) => Promise, jitsiWidth?: number): void { this.load(); this.cowebsiteMainDom.innerHTML = ``; this.currentOperationPromise = this.currentOperationPromise .then(() => callback(this.cowebsiteMainDom)) .then(() => { this.open(); + if (jitsiWidth) { + this.widthpercent = jitsiWidth; + } setTimeout(() => { this.fire(); }, animationTime); diff --git a/front/src/WebRtc/JitsiFactory.ts b/front/src/WebRtc/JitsiFactory.ts index d2b9ebdd..1cc67273 100644 --- a/front/src/WebRtc/JitsiFactory.ts +++ b/front/src/WebRtc/JitsiFactory.ts @@ -82,7 +82,7 @@ class JitsiFactory { return slugify(instance.replace('/', '-') + "-" + roomName); } - public start(roomName: string, playerName:string, jwt?: string, config?: object, interfaceConfig?: object, jitsiUrl?: string): void { + public start(roomName: string, playerName:string, jwt?: string, config?: object, interfaceConfig?: object, jitsiUrl?: string, jitsiWidth?: number): void { coWebsiteManager.insertCoWebsite((async cowebsiteDiv => { // Jitsi meet external API maintains some data in local storage // which is sent via the appData URL parameter when joining a @@ -120,7 +120,7 @@ class JitsiFactory { this.jitsiApi.addListener('audioMuteStatusChanged', this.audioCallback); this.jitsiApi.addListener('videoMuteStatusChanged', this.videoCallback); }); - })); + }), jitsiWidth); } public async stop(): Promise { From da03e60de4ba38cd80eeb0977b75af7e29a6651a Mon Sep 17 00:00:00 2001 From: TabascoEye Date: Mon, 30 Aug 2021 19:42:18 +0200 Subject: [PATCH 4/9] Update GameScene.ts typo fixed --- front/src/Phaser/Game/GameScene.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 1ca52f51..d46d4524 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -836,7 +836,7 @@ export class GameScene extends DirtyScene { this.MapUrlFile, allProps.get("openWebsiteAllowApi") as boolean | undefined, allProps.get("openWebsitePolicy") as string | undefined, - allProps.get("openWebsiteWidth") as number | undefinded + allProps.get("openWebsiteWidth") as number | undefined ); layoutManagerActionStore.removeAction("openWebsite"); }; From e6ae34397529ce5eb2703a26dccc70050dae2897 Mon Sep 17 00:00:00 2001 From: TabascoEye Date: Mon, 30 Aug 2021 19:44:50 +0200 Subject: [PATCH 5/9] Update CoWebsiteManager.ts typos and style --- front/src/WebRtc/CoWebsiteManager.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index f293399c..db89a55c 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -166,7 +166,7 @@ class CoWebsiteManager { return iframe; } - public loadCoWebsite(url: string, base: string, allowApi?: boolean, allowPolicy?: string, widthpercent?: number): void { + public loadCoWebsite(url: string, base: string, allowApi?: boolean, allowPolicy?: string, widthPercent?: number): void { this.load(); this.cowebsiteMainDom.innerHTML = ``; @@ -190,8 +190,8 @@ class CoWebsiteManager { .then(() => Promise.race([onloadPromise, onTimeoutPromise])) .then(() => { this.open(); - if (widthpercent) { - this.widthpercent = widthpercent; + if (widthPercent) { + this.widthPercent = widthPercent; } setTimeout(() => { this.fire(); @@ -206,7 +206,7 @@ class CoWebsiteManager { /** * Just like loadCoWebsite but the div can be filled by the user. */ - public insertCoWebsite(callback: (cowebsite: HTMLDivElement) => Promise, jitsiWidth?: number): void { + public insertCoWebsite(callback: (cowebsite: HTMLDivElement) => Promise, widthPercent?: number): void { this.load(); this.cowebsiteMainDom.innerHTML = ``; this.currentOperationPromise = this.currentOperationPromise @@ -214,7 +214,7 @@ class CoWebsiteManager { .then(() => { this.open(); if (jitsiWidth) { - this.widthpercent = jitsiWidth; + this.widthPercent = widthPercent; } setTimeout(() => { this.fire(); From a0d73f27d97cb25ddad38e499d36f91a3ae1fb3f Mon Sep 17 00:00:00 2001 From: TabascoEye Date: Mon, 30 Aug 2021 19:51:14 +0200 Subject: [PATCH 6/9] Update CoWebsiteManager.ts yet another typo --- front/src/WebRtc/CoWebsiteManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index db89a55c..b2ffb609 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -213,7 +213,7 @@ class CoWebsiteManager { .then(() => callback(this.cowebsiteMainDom)) .then(() => { this.open(); - if (jitsiWidth) { + if (widthPercent) { this.widthPercent = widthPercent; } setTimeout(() => { From bc9131119fe8993b0ec180c6f6024f6bfd59c284 Mon Sep 17 00:00:00 2001 From: kharhamel Date: Wed, 1 Sep 2021 14:21:26 +0200 Subject: [PATCH 7/9] remove the package systeminformation from back --- back/package.json | 1 - back/yarn.lock | 5 ----- 2 files changed, 6 deletions(-) diff --git a/back/package.json b/back/package.json index 8a1e445e..58399ad7 100644 --- a/back/package.json +++ b/back/package.json @@ -54,7 +54,6 @@ "prom-client": "^12.0.0", "query-string": "^6.13.3", "redis": "^3.1.2", - "systeminformation": "^4.31.1", "uWebSockets.js": "uNetworking/uWebSockets.js#v18.5.0", "uuidv4": "^6.0.7" }, diff --git a/back/yarn.lock b/back/yarn.lock index d9382805..37c7bbfe 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -2962,11 +2962,6 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -systeminformation@^4.31.1: - version "4.31.1" - resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-4.31.1.tgz#2e02c26987494d4b6a4d2d83138724593bc98d50" - integrity sha512-dVCDWNMN8ncMZo5vbMCA5dpAdMgzafK2ucuJy5LFmGtp1cG6farnPg8QNvoOSky9SkFoEX1Aw0XhcOFV6TnLYA== - table@^5.2.3: version "5.4.6" resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" From 96ff1f3af1e07fd7537683c41104efd0963008b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 12:23:36 +0000 Subject: [PATCH 8/9] Bump url-parse from 1.5.1 to 1.5.3 in /front Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- front/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/yarn.lock b/front/yarn.lock index bdf52b6b..3ec7e7b0 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -5745,9 +5745,9 @@ urix@^0.1.0: integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-parse@^1.4.3, url-parse@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== + version "1.5.3" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" + integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From df0546a2f35cd723bfc97eb93ad299fef150fbab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 12:28:03 +0000 Subject: [PATCH 9/9] Bump tar from 4.4.15 to 4.4.19 in /back Bumps [tar](https://github.com/npm/node-tar) from 4.4.15 to 4.4.19. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-tar/compare/v4.4.15...v4.4.19) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] --- back/yarn.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/back/yarn.lock b/back/yarn.lock index d9382805..f717308f 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -554,7 +554,7 @@ chokidar@^3.4.0: optionalDependencies: fsevents "~2.1.2" -chownr@^1.1.1: +chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -1159,7 +1159,7 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== @@ -1969,7 +1969,7 @@ minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -1977,7 +1977,7 @@ minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.2.1: +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== @@ -1992,7 +1992,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: +mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -2578,7 +2578,7 @@ rxjs@^6.6.7: dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.2: +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -2978,17 +2978,17 @@ table@^5.2.3: string-width "^3.0.0" tar@^4.4.2: - version "4.4.15" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" - integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" tdigest@^0.1.1: version "0.1.1" @@ -3282,7 +3282,7 @@ y18n@^3.2.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== -yallist@^3.0.0, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==