Closed kkoyung closed 1 year ago
Thanks for the detailed bug report! I assume you're using the dev site, and I've pushed a possible fix, can you try again? 🙏
I've tested with the newest commit. It works fine for you now. Thanks for your quick response. I will close this issue.
Reference: the related commit for fixing this bug - Strip protocol from instance domain/uri
Describe the bug I logged in my GoToSocial server with Phanpy. When I click the compose button at the right botton corner, the browser popped out the alert message "Failed to load instance configuration. Please try again.". After clicking "OK", the browser reload the web app. Therefore, I cannot create new post.
To Reproduce Steps to reproduce the behavior:
Expected behavior Display the compose dialog to create a new post.
Investigation The alert comes from the following code in
src/components/compose.jsx
:According to the function
initMasto(params)
insrc/app.jsx
, since GoToSocial uses v1 Mastodon api, the uri"https://mydomain.com"
, rather than the domain"mydomain.com"
, is used as the index of a member ofinstances
. So, the index of the member ininstances
at line 6 above contains the protocol part.I found that in the function
onSubmit
insrc/pages/login.jsx
, the the protocol part is always removed frominstanceURL
. This value then becomes the value ofcurrentAccount.instanceURL
. So, the value ofcurrentInstance
at line 7 above doesn't contain the protocal part.Hence, at line 8 above, the configuration cannot be retrieved, and then an error is catched.
Solution I tried to change a line in
initMasto(params)
function inapp.jsx
fromto
to make sure no protocol part is including the index of the member of
instances
. It works with my GoToSocial server.However, I am not sure whether the whole uri was used intentionally for other purposes. So, I simply create an issue, instead of a PR.
Desktop (please complete the following information):
Smartphone (please complete the following information):
GoToSocial Version GoToSocial 0.6.0 git-f9e5ec9
Phanpy version Phanpy git-305bb92