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

Defining version 17 stops the shortcut from being signed successfully #34

Closed
mikeogezi opened this issue Dec 5, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@mikeogezi
Copy link
Contributor

mikeogezi commented Dec 5, 2023

Describe the bug
When I define version 17, the generated .plist file is invalid. It causes an error when a sign is attempted:

Signing main_unsigned.shortcut to main.shortcut...
failed!

Error: Failed to sign Shortcut

shortcuts: Error: The data couldn’t be read because it isn’t in the correct format.

To Reproduce
The code to reproduce your issue if applicable:

#define version 17

alert("Hello World!")

Debug output

Parsing main.cherri...
### PARSING ###

Previous Character:
) 3:21

Current Character:
EMPTY 3:21

Current Line:
alert("Hello World!")
## TOKENS ##
1 | {action alert action {alert [{text Hello World!}]}}

## DEFINITIONS ##
Name: main
Color: -1263359489
Glyph: 61440
Inputs: []
Outputs: []
Workflows: []
No Input: { []}
macOS Only: false
Mininum Version: 2038.0.2.4
iOS Version: 17.0

## VARIABLES ##

## MENUS ##
map[]

## IMPORT QUESTIONS ##
map[]

Done.

Generating plist...
### PLIST GEN ###

## UUIDS ##
map[]

Done.

Writing to main.plist...
Done.

Writing to main_unsigned.shortcut...
Done.

Signing main_unsigned.shortcut to main.shortcut...
failed!

Error: Failed to sign Shortcut

shortcuts: Error: The data couldn’t be read because it isn’t in the correct format.


###################
#   DEBUG PANIC   #
###################

### PARSING ###

Previous Character:
EMPTY 1:0

Current Character:
EMPTY 1:0

## TOKENS ##

## DEFINITIONS ##
Name: main
Color: -1263359489
Glyph: 61440
Inputs: []
Outputs: []
Workflows: []
No Input: { []}
macOS Only: false
Mininum Version: 2038.0.2.4
iOS Version: 17.0

## VARIABLES ##

## MENUS ##
map[]

## IMPORT QUESTIONS ##
map[]

### PLIST GEN ###

## UUIDS ##
map[]

### CUSTOM ACTIONS ###


### INCLUDES ###

## INCLUDED ##
[]

## INCLUDES MAP ##
[]

#############################################################

panic: debug

goroutine 1 [running]:
main.panicDebug({0x0, 0x0})
        /Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/[email protected]/main.go:320 +0x12c
main.exit({0x140001a4080?, 0x102bceea5?})
        /Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/[email protected]/main.go:393 +0x10c
main.sign()
        /Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/[email protected]/main.go:227 +0x78c
main.createShortcut()
        /Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/[email protected]/main.go:149 +0x280
main.main()
        /Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/[email protected]/main.go:79 +0x364

Screenshots
N/A

Version Information (please complete the following information):

  • macOS version (run uname -a): Darwin Michaels-MacBook-Air.local 23.2.0 Darwin Kernel Version 23.2.0: Fri Oct 13 09:28:08 PDT 2023; root:xnu-10002.60.54~14/RELEASE_ARM64_T8112 arm64
  • Golang version (run go version): go version go1.21.4 darwin/arm64

Additional context
N/A

@mikeogezi mikeogezi added the bug Something isn't working label Dec 5, 2023
@electrikmilk electrikmilk self-assigned this Dec 13, 2023
@electrikmilk
Copy link
Owner

Thanks for calling this out! This is fixed by 4ea3fff.

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

No branches or pull requests

2 participants