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

Apostrophe in Autogenerated Name Causes Application Crash #3128

Open
john-okeefe opened this issue Dec 13, 2023 · 4 comments · May be fixed by #3151
Open

Apostrophe in Autogenerated Name Causes Application Crash #3128

john-okeefe opened this issue Dec 13, 2023 · 4 comments · May be fixed by #3151
Labels
Bug Something isn't working Good First Issue Good for newcomers

Comments

@john-okeefe
Copy link

Description

In the wails.json file, I'm not sure where the author name is being pulled from, but my name (O'Keefe) has an apostrophe in it. When wails generates the field in the json file it comes over as "John O'Keefe". This causes wails dev to crash on launch with ' ERROR invalid character ''' in string escape code'. Removing the '' fixes this and "John O'Keefe" works perfectly.

To Reproduce

  1. Wherever author name is being pulled from add an apostrophe.
  2. Try to run 'wails dev'.
  3. Watch it crash with a generic error that did not point to where the issue was.
  4. Remove the backslash from the author name.
  5. Watch the previous command run perfectly.

Expected behaviour

Script to handle apostrophes correctly.

Screenshots

No response

Attempted Fixes

No response

System Details

Wails Doctor          
                                

                                                                                                                                                     
# Wails
Version         | v2.7.1
Package Manager | zypper

# System
┌────────────────────────────────────────────────────────────────────┐
| OS           | openSUSE Tumbleweed                                 |
| Version      | 20231211                                            |
| ID           | opensuse-tumbleweed                                 |
| Go Version   | go1.21.5                                            |
| Platform     | linux                                               |
| Architecture | amd64                                               |
| CPU 1        | Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz             |
| CPU 2        | Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz             |
| CPU 3        | Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz             |
| CPU 4        | Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz             |
| GPU          | Virtio 1.0 GPU (Red Hat, Inc.) - Driver: virtio-pci |
| Memory       | 12GB                                                |
└────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name            | Status    | Version         |
| *docker    | docker                  | Available | 24.0.7_ce-2.1   |
| gcc        | gcc-c++                 | Installed | 13-1.6          |
| libgtk-3   | gtk3-devel              | Installed | 3.24.38+111-1.1 |
| libwebkit  | webkit2gtk3-soup2-devel | Installed | 2.42.3-1.1      |
| npm        | npm20                   | Installed | 20.8.1-3.1      |
| pkg-config | pkgconf-pkg-config      | Installed | 1.8.0-2.6       |
└───────────────────── * - Optional Dependency ──────────────────────┘

# Diagnosis
Optional package(s) installation details: 
  - docker: sudo zypper in docker

 SUCCESS  Your system is ready for Wails development!

Additional context

No response

@john-okeefe john-okeefe added the Bug Something isn't working label Dec 13, 2023
@john-okeefe
Copy link
Author

I'm kind of a newb and not good with testing just yet. If someone wants to fix this I believe it can be easily done.

In the file, v2/cmd/wails/init.go, in the function findAuthorDetails after line 232 add a newline and say,
options.AuthorName = strings.Replace(options.AuthorName, "\\", "", -1)

@leaanthony
Copy link
Member

Thanks for raising this. Tagging as a good first issue.

@leaanthony leaanthony added the Good First Issue Good for newcomers label Dec 15, 2023
@sbshah97
Copy link

Hi I'd like to take this up and fix this.

@sbshah97 sbshah97 linked a pull request Dec 20, 2023 that will close this issue
12 tasks
@sbshah97
Copy link

Dropped a PR. Would love to continue contributing if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Good First Issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants