deflix-stremio icon indicating copy to clipboard operation
deflix-stremio copied to clipboard

Cannot run locally on MacOS

Open najmsheikh opened this issue 4 years ago • 2 comments

Here's the stacktrace I get:

2021-08-13T23:10:44-04:00	INFO	Parsing config...
2021-08-13T23:10:44-04:00	INFO	Parsed config	{"config": "{\"bindAddr\":\"localhost\",\"port\":8080,\"baseURL\":\"http://localhost:8080\",\"storagePath\":\"\",\"maxAgeTorrents\":604800000000000,\"cachePath\":\"\",\"cacheAgeXD\":86400000000000,\"redisAddr\":\"\",\"redisCreds\":\"\",\"baseURLyts\":\"https://yts.mx\",\"baseURLtpb\":\"https://apibay.org\",\"baseURL1337x\":\"https://1337x.to\",\"baseURLibit\":\"https://ibit.am\",\"baseURLrarbg\":\"https://torrentapi.org\",\"baseURLrd\":\"https://api.real-debrid.com\",\"baseURLad\":\"https://api.alldebrid.com\",\"baseURLpm\":\"https://www.premiumize.me/api\",\"logLevel\":\"debug\",\"logEncoding\":\"console\",\"logFoundTorrents\":false,\"rootURL\":\"https://www.deflix.tv\",\"extraHeadersXD\":null,\"socksProxyAddrTPB\":\"\",\"webConfigurePath\":\"\",\"imdb2metaAddr\":\"\",\"useOAUTH2\":false,\"oauth2authURLrd\":\"https://api.real-debrid.com/oauth/v2/auth\",\"oauth2authURLpm\":\"https://www.premiumize.me/authorize\",\"oauth2tokenURLrd\":\"https://api.real-debrid.com/oauth/v2/token\",\"oauth2tokenURLpm\":\"https://www.premiumize.me/token\",\"oauth2clientIDrd\":\"\",\"oauth2clientIDpm\":\"\",\"oauth2clientSecretRD\":\"\",\"oauth2clientSecretPM\":\"\",\"oauth2encryptionKey\":\"\",\"forwardOriginIP\":false,\"envPrefix\":\"\"}"}
2021-08-13T23:10:44-04:00	INFO	Validated config
2021-08-13T23:10:44-04:00	INFO	Initializing caches...
2021-08-13T23:10:44-04:00	ERROR	Couldn't load RD availability cache from file - continuing with an empty cache	{"error": "Couldn't open go-cache file: open /Users/xxx/Library/Caches/deflix-stremio/cache/availability-rd.gob: no such file or directory"}
main.initCaches
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:420
main.main
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:163
runtime.main
	/usr/local/go/src/runtime/proc.go:204
2021-08-13T23:10:44-04:00	ERROR	Couldn't load AD availability cache from file - continuing with an empty cache	{"error": "Couldn't open go-cache file: open /Users/xxx/Library/Caches/deflix-stremio/cache/availability-ad.gob: no such file or directory"}
main.initCaches
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:429
main.main
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:163
runtime.main
	/usr/local/go/src/runtime/proc.go:204
2021-08-13T23:10:44-04:00	ERROR	Couldn't load Premiumize availability cache from file - continuing with an empty cache	{"error": "Couldn't open go-cache file: open /Users/xxx/Library/Caches/deflix-stremio/cache/availability-pm.gob: no such file or directory"}
main.initCaches
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:438
main.main
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:163
runtime.main
	/usr/local/go/src/runtime/proc.go:204
2021-08-13T23:10:44-04:00	ERROR	Couldn't load redirect cache from file - continuing with an empty cache	{"error": "Couldn't open go-cache file: open /Users/xxx/Library/Caches/deflix-stremio/cache/redirect.gob: no such file or directory"}
main.initCaches
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:470
main.main
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:163
runtime.main
	/usr/local/go/src/runtime/proc.go:204
2021-08-13T23:10:44-04:00	ERROR	Couldn't load stream cache from file - continuing with an empty cache	{"error": "Couldn't open go-cache file: open /Users/xxx/Library/Caches/deflix-stremio/cache/stream.gob: no such file or directory"}
main.initCaches
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:490
main.main
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:163
runtime.main
	/usr/local/go/src/runtime/proc.go:204
2021-08-13T23:10:44-04:00	ERROR	Couldn't load token cache from file - continuing with an empty cache	{"error": "Couldn't open go-cache file: open /Users/xxx/Library/Caches/deflix-stremio/cache/token.gob: no such file or directory"}
main.initCaches
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:510
main.main
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:163
runtime.main
	/usr/local/go/src/runtime/proc.go:204
2021-08-13T23:10:44-04:00	INFO	Initialized caches	{"duration": "0ms"}
2021-08-13T23:10:44-04:00	INFO	Initializing stores...
2021-08-13T23:10:44-04:00	FATAL	Couldn't open BadgerDB	{"error": "Error Creating Dir: \"/Users/xxx/Library/Caches/deflix-stremio/badger\": mkdir /Users/xxx/Library/Caches/deflix-stremio/badger: no such file or directory", "errorVerbose": "mkdir /Users/xxx/Library/Caches/deflix-stremio/badger: no such file or directory\nError Creating Dir: \"/Users/xxx/Library/Caches/deflix-stremio/badger\"\ngithub.com/dgraph-io/badger/v2/y.Wrapf\n\t/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/y/error.go:82\ngithub.com/dgraph-io/badger/v2.createDirs\n\t/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:1783\ngithub.com/dgraph-io/badger/v2.Open\n\t/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:251\nmain.initStores\n\t/go/src/deflix-stremio/cmd/deflix-stremio/main.go:383\nmain.main\n\t/go/src/deflix-stremio/cmd/deflix-stremio/main.go:165\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:204\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1374"}
main.initStores
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:385
main.main
	/go/src/deflix-stremio/cmd/deflix-stremio/main.go:165
runtime.main
	/usr/local/go/src/runtime/proc.go:204

najmsheikh avatar Aug 14 '21 03:08 najmsheikh

Hello, sorry for the late reply! It seems the BadgerDB library can't create the directory for its database file. Maybe there are some permissions set to prevent that? I don't have a Mac to reproduce/test it unfortunately. Can you please try one of the following:

  • Create the directory path manually, for example in Finder, then try to run the app again.
  • Run the program with passing an additional configuration option: --storagePath <YOUR_PATH>, where you substitute <YOUR_PATH> by a path to a directory where you know apps have write permissions.

doingodswork avatar Aug 22 '21 18:08 doingodswork

Hello, I got a similar issue on Linux :

"errorVerbose": "mkdir /home/user/.cache/deflix-stremio/badger: no such file or directory

The reason is : the software is trying to create a folder named badger inside a folder named deflix-stremio, which doesn't exist, inside the .cache folder.

So, there are multiple solutions :

  • Creating the deflix-stremio folder inside the .cache folder before running the currently failing command
  • Adding the -p parameter to the currently failing command.

Thanks

KaKi87 avatar Oct 30 '21 13:10 KaKi87