Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unicode support for appName parameter #2432

Open
4 tasks done
beiguancyc opened this issue May 4, 2023 · 15 comments
Open
4 tasks done

Add unicode support for appName parameter #2432

beiguancyc opened this issue May 4, 2023 · 15 comments
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature

Comments

@beiguancyc
Copy link

beiguancyc commented May 4, 2023

New Issue Checklist

Enviroment:

parse-dashboard 5.1.0 / parse-server 5.4.0

Issue Description

Since version 5.0, clicking on the sidebar always results in a 404 error page, and the data only shows up after refreshing again. This issue did not exist in version 4.x.

Based on my testing, starting from version 5.0, it is not possible to use the parse-dashboard-config.json file as a configuration file. Otherwise, a 404 error will occur.
image

@parse-github-assistant
Copy link

parse-github-assistant bot commented May 4, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@beiguancyc beiguancyc changed the title This issue always results in a 404 error Parse Dashboard cannot use the configuration file parse-dashboard-config.json in versions 5.x and above, as it will result in a 404 error. May 5, 2023
@beiguancyc beiguancyc changed the title Parse Dashboard cannot use the configuration file parse-dashboard-config.json in versions 5.x and above, as it will result in a 404 error. Parse Dashboard cannot use the configuration file in versions 5.x and above, as it will result in a 404 error. May 5, 2023
@beiguancyc beiguancyc changed the title Parse Dashboard cannot use the configuration file in versions 5.x and above, as it will result in a 404 error. Parse Dashboard cannot use the configuration file in versions 5.x and above May 5, 2023
@beiguancyc beiguancyc changed the title Parse Dashboard cannot use the configuration file in versions 5.x and above Parse Dashboard cannot use the configuration file in versions 5.x May 5, 2023
@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label May 7, 2023
@mtrezza
Copy link
Member

mtrezza commented Jun 5, 2023

Could you provide step-by-step instructions to replicate this issue, maybe as a screen recording?

@beiguancyc
Copy link
Author

beiguancyc commented Jun 6, 2023

Could you provide step-by-step instructions to replicate this issue, maybe as a screen recording?

Sure.

  1. npm install -g parse-dashboard
  2. this is my config file named parse-dashboard-config.json
{

"apps": [ 
	{
      "serverURL": "https://www.aaa.com:7998",
	  "graphQLServerURL": "https://www.aaa.com:7998/graphql",
      "appId": "aaaa",
      "masterKey": "aaaaaa",
      "javascriptKey": "aaaa",
      "appName": "aaa",
	  "production": true,
      "iconName": "logo.png"
    }
	],
  "iconsFolder": "icons",
  "users": [
    {
      "user":"user1",
      "pass":"pass"
    }
  ]
}
  1. open cmd, parse-dashboard --config C:\config\parse-dashboard-config.json
  2. then visit http://127.0.0.1:4040/
  3. so,The 404 page will keep appearing as long as you continue to use it.
  4. If I switch to parse-dashboard 4.x, everything works fine.

@mtrezza
Copy link
Member

mtrezza commented Jun 6, 2023

The only documented breaking change to 5.x is drop of Node 12 support, so the config file should be working. Could you remove parts of the config to see what part is causing this? Or maybe the other way around; start with a plain deployment and gradually add your customizations.

You are installing globally. Could you remove any cached version of Parse Dashboard and not install globally but locally?

@beiguancyc
Copy link
Author

I have followed your suggestion and simplified the configuration file to the minimum possible extent. Additionally, I have tested it on two clean virtual machines, but the results remain the same as my previous tests. I would like to know if you are able to reproduce this issue on your end.

{

"apps": [ 
	{
      "serverURL": "https://www.aaa.com:7998",
      "appId": "aaaa",
      "masterKey": "aaaaaa" 
    }
],
  
  "users": [
    {
      "user":"user1",
      "pass":"pass"
    }
  ]
}

@mtrezza
Copy link
Member

mtrezza commented Jun 6, 2023

Could you try to use a fresh, non-customized deployment of Parse Dashboard? If that also fails then we would at least know that it hasn't anything to do with your config, but possibly with your setup

@beiguancyc
Copy link
Author

If you run the command parse-dashboard --appId aaaa --masterKey aaaaaa --serverURL "https://www.aaa.com:7998" --appName optionalName without using a configuration file, it works fine.
Furthermore, I have validated the results on multiple machines.

@mtrezza
Copy link
Member

mtrezza commented Jun 6, 2023

If you can reproduce the issue locally, you could just clone the Parse Dashboard repository and debug-step through the code to see what leads you to the 404 page.

@beiguancyc
Copy link
Author

If you can reproduce the issue locally, you could just clone the Parse Dashboard repository and debug-step through the code to see what leads you to the 404 page.

Can you reproduce this issue on your end?
If you cannot reproduce it, then it seems to be an issue specific to me.

@mtrezza
Copy link
Member

mtrezza commented Jun 7, 2023

I was not able to reproduce this, the dashboard config file is a very basic functionality, I would be surprised if it didn't work for any version 5.x; hence I'd suggest to try it out with a fresh, clean clone of the repository and see it it works.

@beiguancyc
Copy link
Author

I was not able to reproduce this, the dashboard config file is a very basic functionality, I would be surprised if it didn't work for any version 5.x; hence I'd suggest to try it out with a fresh, clean clone of the repository and see it it works.

I believe I have identified the issue. I found that if the appName contains Chinese characters, it consistently triggers the problem, for example, "appName": "南".

@mtrezza
Copy link
Member

mtrezza commented Jun 7, 2023

Yes, I can imagine that unicode support does not explicitly exist for internal configuration parameters, such as app name. But you said you used the same config file, only changed the dashboard version, so do you mean an app name with Chinese chars worked on 4.x?

@beiguancyc
Copy link
Author

Yes, I can imagine that unicode support does not explicitly exist for internal configuration parameters, such as app name. But you said you used the same config file, only changed the dashboard version, so do you mean an app name with Chinese chars worked on 4.x?

Yes, using Chinese characters for appName doesn't cause any issues in version 4.x.

@mtrezza
Copy link
Member

mtrezza commented Jun 7, 2023

I don't think that Parse Server and Parse Dashboard officially support unicode for internal parameters such as appName or appId or any of the client SDK keys such as javascriptKey. My default assumption would be that it doesn't, because there's some string manipulation throughout the code (in Parse Server and Parse Dashboard) that would not work for unicode and I didn't see any test in Parse Server for unicode compatibility.

So I'll classify this as a feature request rather than a bug. Please feel free if you want to investigate this further and add unicode support for the app name in Parse Dashboard. We should also add a note to the docs once support is added.

@mtrezza mtrezza changed the title Parse Dashboard cannot use the configuration file in versions 5.x Support unicode characters for appName parameter Jun 7, 2023
@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:bug Impaired feature or lacking behavior that is likely assumed labels Jun 7, 2023
@mtrezza mtrezza changed the title Support unicode characters for appName parameter Add unicode support for appName parameter Jun 7, 2023
@mtrezza mtrezza added the bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) label Jun 7, 2023
@xiangdong9013
Copy link

I got the same issue. My 'appName' contains Chinese characters, too.When change the 'appName' to pure English,it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants