Spreed.Me Server on different SubDomain not working

Hey Guys,
I tried to install a Spreed.Me Server,
It seems to work, but I cannot interact with the Spreed.Me App at all.
It doesnt show me my user id or anything else.
In the console I get this error:

Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://www.xyz.eu’) does not match the recipient window’s origin (‘https://cloud.xyz.eu’).

Is it a problem to run spreed.me on another subdomain?
THanks Guys, sorrry for my bad english.

Hi @Jonas_Krug ,

most likely this is an issue with your configuration.
Can you please post your Spreed.ME Nextcloud app, Spreed WebRTC and web server (nginx or Apache) config?

Hi, thanks for your answer.
Yeah I think so too. Im currently using OC9. Have to migrate when I’ve got time. But it should still work right?
Here’s my config:

webrtc.conf:

[http]
listen = 127.0.0.1:8080
root = /usr/share/spreed-webrtc-server/www
basePath = /webrtc/

[app]
sessionSecret = #secret#
encryptionSecret = #secret#
authorizeRoomJoin = true
serverToken = #secret#
serverRealm = local
extra = /var/www/owncloud/apps/spreedme/extra
plugin = extra/static/owncloud.js

[users]
enabled = true
mode = sharedsecret
sharedsecret_secret = #secret#

SpreedMe-OCApp config.php:

class Config {
const SPREED_WEBRTC_ORIGIN = ‘https://www.xyz.eu’;
const SPREED_WEBRTC_BASEPATH = ‘/webrtc/’;
const SPREED_WEBRTC_SHAREDSECRET = ‘secret’;
const SPREED_WEBRTC_IS_SHARED_INSTANCE = false;
const OWNCLOUD_TEMPORARY_PASSWORD_LOGIN_ENABLED = true;
const OWNCLOUD_TEMPORARY_PASSWORD_SIGNING_KEY = ‘secret’;

    private function __construct() {
    }

OwnCloudConfig.js

(function(window) {

    var OwnCloudConfig = function() {
            return {
                    OWNCLOUD_ORIGIN: '',
            };
    };
    if (typeof define === "function" && define.amd) {
            define(OwnCloudConfig);
    } else {
            window.OwnCloudConfig = OwnCloudConfig();
    }

})(window);

nginx-config (in the main server with many other stuff):

location /webrtc {
    proxy_pass http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_buffering             on;
    proxy_ignore_client_abort   off;
    proxy_redirect              off;
    proxy_connect_timeout       90;
    proxy_send_timeout          90;
    proxy_read_timeout          90;
    proxy_buffer_size           4k;
    proxy_buffers               4 32k;
    proxy_busy_buffers_size     64k;
    proxy_temp_file_write_size  64k;
    proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;
}

Hope thats enough. The Proxy_Pass works on Nginx.

The OC-Server is reachable under https://cloud.xyz.eu

In the config.php, please set const SPREED_WEBRTC_ORIGIN = ''; (empty string) and try it again.

Hi leon,
thanks for your answer. If I leave it empty, I get an error in OC, saying that the file is not found…

An error saying that which file was not found?

when I click on the OC-App, it says

File not found
The requested document wasnt fond on the server.
Click here to go back to ownCloud.

Can you please open https://cloud.xyz.eu/webrtc/ in your browser? Does that work?
If not, please verify that the location /webrtc { block in nginx is in your Nextcloud server block.

No, that doesnt work. Only https://www.xyz.eu/webrtc/ works.
Ok, I try to put the webrtc location in the nextcloud block.

ok, so now the location does work, but i get only 404 error and see nothing.

https://cloud.xyz.eu/webrtc/static/ver=0281/css/bootstrap.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/static/ver=0281/css/font-awesome.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/static/ver=0281/css/main.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/extra/static/ver=0281/css/owncloud.css Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/static/ver=0281/js/libs/require/require.js Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/extra/static/ver=0281/img/logo-32x32.png Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/extra/static/ver=0281/img/logo-16x16.png Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/static/ver=0281/css/bootstrap.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/static/ver=0281/css/font-awesome.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
https://cloud.xyz.eu/webrtc/static/ver=0281/css/main.min.css Failed to load resource: the server responded with a status of 404 (Not Found)

Please try to use location ^~ /webrtc { instead of location /webrtc {
This issue was fixed in the meantime.

Now it works, awesome.
Thanks so much