Comments (10)
Now there’s one more problem, but I’m not sure it’s related to this issue …
from synapse-admin.
I assume you are working on Ubuntu. It seems you have the wrong "yarn" installed. See https://stackoverflow.com/questions/46013544/yarn-install-command-error-no-such-file-or-directory-install
from synapse-admin.
Thank you for your reply. This seems to work, somewhat. It’s necessary to install node >= 10, too, from probably external resources … e.g. via curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
Maybe this should be part of the README, in case others are having the same problems.
from synapse-admin.
Is the homeserver you configured reachable from your system? The network error may indicate that's not the case. Are there errors in the browsers console or in the network tab of the browsers developer tools?
from synapse-admin.
It’s definitely reachable, I’m interacting with it through Element. No network errors, but some errors in the console, yes …
Navigated to http://<some_ip>/#/users
The development server has disconnected.
Refresh the page if necessary. 0.chunk.js:152786:13
[HMR] Waiting for update signal from WDS... log.js:24
Download the React DevTools for a better development experience: https://fb.me/react-devtools react-dom.development.js:24994
checkAuth […] authProvider.js:48
getList users dataProvider.js:134
httpClient https://some.domain/_synapse/admin/v2/users?deactivated=false&dir=f&from=0&guests=true&limit=10&order_by=id dataProvider.js:7
checkAuth […] authProvider.js:48
XHROPTIONShttps://some.domain/_synapse/admin/v2/users?deactivated=false&dir=f&from=0&guests=true&limit=10&order_by=id
[HTTP/1.1 404 Not Found 46ms]
TypeError: NetworkError when attempting to fetch resource. index.js:1
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://some.domain/_synapse/admin/v2/users?deactivated=false&dir=f&from=0&guests=true&limit=10&order_by=id. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://some.domain/_synapse/admin/v2/users?deactivated=false&dir=f&from=0&guests=true&limit=10&order_by=id. (Reason: CORS request did not succeed).
checkError undefined 2 authProvider.js:39
Warning: Missing translation for key: "NetworkError when attempting to fetch resource."
from synapse-admin.
The 404 error could mean that the endpoint is not correct (which version of synapse are you talking to? The latest version of synapse-admin need synapse to be at least v1.18.0)
But maybe the CORS errors are the problem. Maybe the server running synapse does not set the correct headers?
from synapse-admin.
synapse shouldn’t be the problem.
root@host:/var/www/element# dpkg -l | grep matrix-synapse
ii matrix-synapse-py3 1.19.0+bionic1 amd64 Open federated Instant Messaging and VoIP server
I don’t think we do set any headers manually … is there some way to, hm, allow the access from the interface-server-ip? I don’t really know that much about CORS headers. But, I mean, we can connect to our homeserver from Element Desktop, too, so I wouldn’t quite understand why the connection from the interface would not work.
from synapse-admin.
I just tried adding the following to my homeserver’s nginx sites file, as seen in: https://serverfault.com/a/716283
location /_synapse {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
}
}
Still results in errors:
GEThttps://some.domain/_synapse/admin/v2/users?deactivated=false&dir=f&from=0&guests=true&limit=10&order_by=id
[HTTP/1.1 404 Not Found 33ms]
TypeError: NetworkError when attempting to fetch resource. index.js:1
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://some.domain/_synapse/admin/v2/users?deactivated=false&dir=f&from=0&guests=true&limit=10&order_by=id. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Maybe the CORS is not the problem, but why is this error 404 shown there in the first line?
from synapse-admin.
Maybe related: #65
My nginx config is as described in the synapse docs …
location /_matrix {
proxy_pass http://127.0.0.1:8008;
proxy_set_header X-Forwarded-For $remote_addr;
client_max_body_size 10M;
}
from synapse-admin.
Seems your nginx config is missing the _synapse endpoint which is used by the admin api. Hence the 404
from synapse-admin.
Related Issues (20)
- Can't login, upstream timed out
- Increase max number of export rows for Federated Servers HOT 2
- Н
- Getting static white screen when deploying HOT 1
- MAS compatibility issues HOT 10
- Send image as a server notice
- Slashes in user IDs are not encoded and users not viewable HOT 5
- Allow Event Reports to get deleted
- Allow to manage rate limit of a user
- Error with synapse-admin and HTTPS HOT 4
- ENV REACT_APP_SERVER="https://matrix.example.com" DOES NOT WORK HOT 1
- Connexion Homeserver URL HOT 1
- Bad Request: undefined when trying to modify a user HOT 1
- RFC: Migrate to Vite.js HOT 4
- Creating a user might overwrite an existing user with same MXID HOT 2
- Registration token page invisible
- URL has to start with 'http://' or 'https://' HOT 1
- how to modify REACT_APP_SERVER arg after build synapse-admin on docker HOT 4
- Encryption Support? HOT 1
- Put the version of synapse_admin in `manifest.json` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synapse-admin.