spicetify / cli

Command-line tool to customize Spotify client. Supports Windows, MacOS, and Linux.
https://spicetify.app
GNU Lesser General Public License v2.1
18.17k stars 716 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #968

Closed Tyde closed 3 years ago

Tyde commented 3 years ago

I installed spicetify-cli with the Powershell method on Windows. Installation had no issues and also running spicetify did not result in errors, but when I executed spicetify backup apply enable-devtoolas in the Basic Usage page, I got the following output

spicetify v2.5.0
Backing up app files:
OK
Extracting:
OK
Preprocessing:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0xa909d6]

goroutine 1 [running]:
github.com/khanhas/spicetify-cli/src/preprocess.Start.func1(0xc00000d8f0, 0x2c, 0x0, 0x0, 0xb9b3c0, 0xc000020030, 0xc0000060e8, 0x0)
        D:/Code/spicetify-cli/src/preprocess/preprocess.go:64 +0x56
path/filepath.Walk(0xc00000d8f0, 0x2c, 0xc00047dd10, 0x0, 0x0)
        D:/Program Files/Go/src/path/filepath/path.go:499 +0x8a
github.com/khanhas/spicetify-cli/src/preprocess.Start(0xc0000c21b0, 0x27, 0x101010101)
        D:/Code/spicetify-cli/src/preprocess/preprocess.go:63 +0x416
github.com/khanhas/spicetify-cli/src/cmd.Backup(0xb952d4, 0x5)
        D:/Code/spicetify-cli/src/cmd/backup.go:61 +0x826
main.main()
        D:/Code/spicetify-cli/spicetify.go:183 +0x5b2

The paths in the config file seem to be correct.

casungo commented 3 years ago

This is new 🤔 Try this community patch maybe it fixes something. Also it's a good thing to restart your PC just in case (good old power off power on)

Tyde commented 3 years ago

Sadly both the community patch and restarting the PC did not help

casungo commented 3 years ago

Ok so, I just realized that the error is basically the same as the popular #845 error, minus the Cannot find symbol for Custom app React symbols part, strange that the community patch did nothing. I'm out of ideas, might as well wait for someone with more knowledge than me to help you :D

afonsojramos commented 3 years ago

@Tyde can you retry using the spicetify upgrade method?

Tyde commented 3 years ago

I tried.

I still get the error:

Fetch latest release info:
OK
info Current version: 2.5.0-itsmeow-patch4
info Latest release: 2.6.0
Downloading:
OK
Extracting:
OK                                                                                                                      
success spicetify is up-to-date.                                                                                       
info Please run "spicetify restore backup apply" to receive new features and bug fixes                                  
PS C:\Users\thiem> spicetify backup apply enable-devtool                                                                
spicetify v2.5.0-itsmeow-patch4                                                                                         
    info There is available backup.                                                                                         
    info Clear current backup:                                                                                              
success Backup is cleared.
Backing up app files:
OK
Extracting:
OK
Preprocessing:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0x1170bd6]

goroutine 1 [running]:
github.com/khanhas/spicetify-cli/src/preprocess.Start.func1(0xc000302510, 0x2c, 0x0, 0x0, 0x127b540, 0xc0002da090, 0xc000006350, 0x0)
        C:/Users/itsmeow/spicetify-cli/spicetify-cli/src/preprocess/preprocess.go:65 +0x56
path/filepath.Walk(0xc000302510, 0x2c, 0xc0003edd10, 0x0, 0x0)
        C:/Program Files/Go/src/path/filepath/path.go:499 +0x8a
github.com/khanhas/spicetify-cli/src/preprocess.Start(0xc00000c4e0, 0x27, 0x101010101)
        C:/Users/itsmeow/spicetify-cli/spicetify-cli/src/preprocess/preprocess.go:64 +0x416
github.com/khanhas/spicetify-cli/src/cmd.Backup(0x12769e0, 0x14)
        C:/Users/itsmeow/spicetify-cli/spicetify-cli/src/cmd/backup.go:61 +0x826
main.main()
        C:/Users/itsmeow/spicetify-cli/spicetify-cli/spicetify.go:183 +0x5b2

Weirdly the version at the beginning did not change.

TheGeeKing commented 3 years ago

Hi @Tyde,

Do you still encounter this issue? If so, please provide more information like the version of Spotify and Spicetify that you are using. Can you also please provide your config file. Did you try to completely uninstall Spicetify (spicetify-cli and .spicetify folders) and run Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/khanhas/spicetify-cli/master/install.ps1" | Invoke-Expression to install Spicetify.

itsmeow commented 3 years ago

This appears to be a filesystem read/write error. Can you show a screenshot of your %appdata%/Spotify/Apps folder? What's inside the xpui folder there?

Tyde commented 3 years ago

@TheGeeKing I just did delete both folders and did run the Installation script as you said and still get the same error

The config file is just the generated one:

[Setting]
current_theme           = SpicetifyDefault
check_spicetify_upgrade = 0
prefs_path              = C:\Users\thiem\AppData\Local\Packages\SpotifyAB.SpotifyMusic_zpdnekdrzrea0\LocalState\Spotify\prefs
color_scheme            = 
inject_css              = 1
replace_colors          = 1
overwrite_assets        = 0
spotify_launch_flags    = 
spotify_path            = C:\Users\thiem\AppData\Roaming\Spotify

[Preprocesses]
remove_rtl_rule       = 1
expose_apis           = 1
disable_upgrade_check = 1
disable_sentry        = 1
disable_ui_logging    = 1

[AdditionalOptions]
extensions     = 
custom_apps    = 
sidebar_config = 1
home_config    = 1

[Patch]

; DO NOT CHANGE!
[Backup]
version = 
with    = 

@itsmeow This is the screenshot: grafik

I don't see a xpui folder

My spotify version is 1.1.66.580.gbd43cbc9-a

It seems like I did install Spotify via the Microsoft Store. Maybe that causes the issue?

Tyde commented 3 years ago

To add on that: I've searched through both my drives and there actually no xpui folder anywhere to be found.

TheGeeKing commented 3 years ago

Hi,

It seems like I did install Spotify via the Microsoft Store. Maybe that causes the issue?

Yep, that's the issue.

https://www.spotify.com/us/download/

If the problem is fixed after the installation of Spotify, please close the issue.

Tyde commented 3 years ago

Yep that solved it. Thanks!