streamer45 / mattermost-plugin-voice

Mattermost plugin for voice messaging. :microphone: :sound:
MIT License
81 stars 20 forks source link

error in start recording #17

Open surbiks opened 4 years ago

surbiks commented 4 years ago

when click on start recording show record dialog but timer is stopped in 0. Screenshot from 2020-06-16 14-39-25

streamer45 commented 4 years ago

Hi @golil ,

a couple of questions to help with debugging:

surbiks commented 4 years ago

hi

streamer45 commented 4 years ago

@golil

From the error it looks like the plugin is unable to create the worker needed to initialize the recorder. This should be a JavaScript file stored at /plugins/${pluginId}/public/recorder.worker.js.

The most likely reason is that the file is not found somehow (maybe nginx not rewriting properly). Can you show your network tab after a reload? It should show all the fetches resources and a failure for that file.

surbiks commented 4 years ago

hi if check again when reload page cant load config file

13
12
14

all file load successfully but config URL is wrong

streamer45 commented 4 years ago

Ah, that's interesting and it might be what's causing your error. The config should be located at /plugins/com.mattermost.voice/config when the plugin is enabled. Could the proxy you have in between be causing the problem? I would try to fetch the config directly from Mattermost (locally on http) and see if it's found.

surbiks commented 4 years ago

i check mattermost plugins location in server and no any config file in /plugins/com.mattermost.voice/ try to change settings and save again but its not store config to file , no any config file in plugin folder.

my proxy shouldn't be a problem because i have several service in my server and all of theme use this proxy

update: i now create config manually in server and config file loaded.but have some error again : 122 123

surbiks commented 4 years ago

i think problem is mattermost server address beacuse i use custom address like https://xyz.ss/app/mm for mattermost but your plugin cant use it. i check your screen plugin and its have same problem in upload file

streamer45 commented 4 years ago

@golil

I see, you have the Mattermost installation in a subpath. That explains it. I've pushed a fix and published a new release. Let me know if that works :+1:

surbiks commented 4 years ago

i use new release but not work

3232

streamer45 commented 4 years ago

That looks like the proxy is not redirecting properly then. Is the recorder.worker.js file in the plugin's public folder?

surbiks commented 4 years ago

That looks like the proxy is not redirecting properly then. Is the recorder.worker.js file in the plugin's public folder?

yes its located in plugins folder. how can solved this? i use nginx

streamer45 commented 4 years ago

@golil

First of all I'd check if your SiteURL is properly set. It needs to include the subpath. You can find more specific information here. Also, a sample of your nginx configuration would be useful.

surbiks commented 4 years ago
location /app/mm {  
    gzip on;

    proxy_set_header Connection "";  
    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_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;  
    proxy_set_header X-Frame-Options SAMEORIGIN;  
    proxy_buffers 256 16k;  
    proxy_buffer_size 16k;  
    proxy_read_timeout 600s;  

    include /opt/app/conf.d/restrictions.conf;  

    set $upstream http://mattermost:8000;  
    proxy_pass $upstream;  
}  

its my proxy config, Site URL is set correctly.

streamer45 commented 4 years ago

Can you try and see if fetching https://yoursite/app/mm/static/plugins/com.mattermost.voice/public/recorder.worker.js works?

surbiks commented 4 years ago

Can you try and see if fetching https://yoursite/app/mm/static/plugins/com.mattermost.voice/public/recorder.worker.js works?

no not work. but this work https://mysite/app/mm/static/plugins/com.mattermost.voice/com.mattermost.voice_8d7088889a8f7053_bundle.js

streamer45 commented 4 years ago

That's expected being a static file. But every other plugin related file should be accessible through:

https://$SITE_URL/plugins/com.mattermost.voice/public/somefile

Does the config endpoint work now?

https://yoursite/app/mm/plugins/com.mattermost.voice/config

surbiks commented 4 years ago

That's expected being a static file. But every other plugin related file should be accessible through:

https://$SITE_URL/plugins/com.mattermost.voice/public/somefile

Does the config endpoint work now?

https://yoursite/app/mm/plugins/com.mattermost.voice/config

yes config endpoint work Screenshot from 2020-06-24 13-31-27