The origin hubs repo is always updating, and we are running on different servers, so it comes with different kinds of errors.
Sometimes the error I face doesn’t necessarily mean you also face it.
With that said, I am sharing different server errors along with solutions. So, let’s dive into it.
1. How to fix 502 server communication error in hubs admin:
Ok, let’s try to solve this.
The problem is an API call to this route
/api/ita/admin-info
and other with slash ita /ita
if we check where is the code in the reticulum which handles that open the router.ex ita API call the RetWeb.Plugs.ItaProxy if you in vs code you can command+click / ctrl+click to find the function that is called.
scope "/api/postgrest" do
pipe_through([:secure_headers, :auth_required, :admin_required, :proxy_api])
forward("/", RetWeb.Plugs.PostgrestProxy)
end
What is port 3000?
Thanks to the contributor that give me a clue about the port 3000
it’s a PostgREST
Make sure Postgres is running on port 3000
2. How to Spoke Assets Thumbnail not Showing on Production
First go to spoke directory and then edit /src/api/Api.js Find the scaledThumbnailUrlFor function into this file and change it with below code:
export const scaledThumbnailUrlFor = (url, width, height) => {
// if (configs.RETICULUM_SERVER.includes("hubs.local") && url.includes("hubs.local")) {
// return url;
// }
if (configs.RETICULUM_SERVER) {
return url;
}
return `https://${configs.THUMBNAIL_SERVER}/thumbnail/${farsparkEncodeUrl(url)}?w=${width}&h=${height}`;
};
3. How to Upload Assets too Large on Spoke Production
It because nginx Open up the nginx configuration file
sudo nano /etc/nginx/nginx.conf
add this client_max_body_size to the http section
http {
####################################
## Increase uploading size on server
####################################
client_max_body_size 100M;
}
verify nginx configuration with below command
sudo nginx -t
You will see the below output with above command:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Then restart nginx
sudo systemctl restart nginx
4. How to fix Error while running reticulum on iMac with command “iex -S mix phx.server”
When I am running “iex -S mix phx.server” on an elevated administrator terminal, and getting error:
== Compilation error in file lib/ret/schema.ex ==
** (CompileError) lib/ret/schema.ex:39: call to local macro is_struct/1 conflicts with imported Kernel.is_struct/1, please rename the local macro or remove the conflicting import
(elixir 1.14.2) expanding macro: Kernel.and/2
lib/ret/schema.ex:39: Ret.Schema.is_schema/1
(elixir 1.14.2) expanding macro: Kernel.and/2
lib/ret/schema.ex:40: Ret.Schema.is_schema/1
(elixir 1.14.2) expanding macro: Kernel.Utils.defguard/2
lib/ret/schema.ex: Ret.Schema.is_schema/1
Solution:
This issue occurred when you have not loaded the elixir while compiling the code.
First run the below command into terminal
echo $PATH
Then you will find that ~/.asdf/shims folder is missing from global paths. You need to add it into the path file. First, edit the /etc/paths file from the etc folder on Mac. On Windows you need to set environment variables from settings.
add ~/.asdf/shims at the top of the path file in the etc folder But we need to add full path of home directory instead of ~ operator In my case I have added /Users/mymac/.asdf/shims
then close terminal and open it again Now try again the command “iex -S mix phx.server” for run reticulum.
5. What happen when (Plug.Conn.NotSentError) a response was neither set nor sent from the connection
I have faced this error many times. Then I checked and found that this problem comes when you have added host and assets_host. So I have connected both separately and then restarted the reticulum and the problem is fixed.
Please check the reticulum Config file below: File: /config/dev.exs
host = "hubs.local"
cors_proxy_host = "hubs-proxy.local"
assets_host = "hubs-assets.local"
link_host = "hubs-link.local"
6. I am not able to load any Scenes, Avatars, Projects in hubs admin dashboard
When I am trying to access Any menu from the admin dashboard then It redirects me to the login page with “No Permission” error.
Then I checked and found that I missed the “@” operator before the jwt-secret value. After adding this, the hub’s admin dashboard is working fine.
Please check reticulum.conf file below:
# reticulum.conf
db-uri = "postgres://postgres:postgres@localhost:5432/ret_dev"
db-schema = "ret0_admin"
db-anon-role = "postgres_anonymous"
jwt-secret = "@/absolute_path_to_your_file/reticulum-jwk.json"
jwt-aud = "ret_perms"
role-claim-key = ".postgrest_role"
The Bottom Lines
Finally, you have understood different errors as well as solutions belongs to origin hubs repo. But if you’re still struggling to know hub usage errors and unable to fix them, then give us a call. Our experts can provide you ultimate solutions for origin hub errors along with assistance, so you can avoid these issues in further.
To get instant help and guidance. Don’t let hub usage errors disrupt your work, let us help you fix them today.