sandstorm / synco

Synco - an Database and File Dump Downloader for synchronizing production, staging, and local development. Batteries included, but removable.
https://sandstorm.github.io/synco
MIT License
26 stars 2 forks source link

Error with file type PublicFiles: error on downloading #6

Open breadlesscode opened 2 years ago

breadlesscode commented 2 years ago

First, thanks a lot for this package! Its a missing piece for the daily development <3

I tried it on our server as the readme says. But i got the following error:

  FATAL   Error with file type PublicFiles: error on downloading <BASE>/./Web/_Resources/Persistent to Resources/_/R/e/s/_Resources: file meta.json.enc not found                                           
 [0/4096]  0% | 1spanic: 

goroutine 1 [running]:
github.com/pterm/pterm.checkFatal(...)
        github.com/pterm/pterm@v0.12.49/prefix_printer.go:348
github.com/pterm/pterm.(*PrefixPrinter).Printfln(0x18963e0, {0x1509702, 0x1b}, {0xc0001b16d8, 0x2, 0x2})
        github.com/pterm/pterm@v0.12.49/prefix_printer.go:290 +0x1e8
github.com/sandstorm/synco/pkg/receive/cmd.glob..func1(0x18980c0?, {0xc000072200?, 0x2?, 0x2?})
        github.com/sandstorm/synco@v1.0.0/pkg/receive/cmd/receive-cmd.go:90 +0xab9
github.com/spf13/cobra.(*Command).execute(0x18980c0, {0xc0000721c0, 0x2, 0x2})
        github.com/spf13/cobra@v1.4.0/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x1897e40)
        github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.4.0/command.go:902
github.com/sandstorm/synco/cmd.Execute()
        github.com/sandstorm/synco@v1.0.0/cmd/root.go:47 +0x85
main.main()
        github.com/sandstorm/synco@v1.0.0/main.go:23 +0xa5

Am I doing something wrong?

Thanks again for your hard work!

skurfuerst commented 2 years ago

@breadlesscode what did you specify as base URL? I feel that something is wrong there (and of course we need to improve error reporting :D )

breadlesscode commented 2 years ago

Hi,

I cant post the real URL, but the format of the base URL is project.beta.domain.com.

It prompts the correct URL after I entered this:

SUCCESS  Found correct base URL at https://project.beta.domain.com

But the path in the meta.json seems to be invalid (see error message)

Error:

FATAL   Error with file type PublicFiles: error on downloading <BASE>/./Web/_Resources/Persistent to Resources/_/R/e/s/_Resources: file meta.json.enc not found

Output of recieve with --debug:

./synco receive ts-y-e2iKz PwlIH7gT7J9xIILIMR5wDIqWu0KLa6 --debug
  DEBUG   Trying to detect the base URL: https://xyz.de
  DEBUG   Trying to download https://xyz.de/ts-y-e2iKz/meta.json.enc
 SUCCESS  Found correct base URL at https://xyz.de (based on .synco.yml)
  DEBUG   Trying to download https://xyz.de/ts-y-e2iKz/meta.json.enc
 SUCCESS  Valid Decryption Key
 INFO  Framework on server: Neos/Flow
Select data to download: 
  > dbDump (MysqlDump: 22 MiB)
  > Resources (PublicFiles: 4.0 KiB)

 INFO  Downloading: dbDump (MysqlDump: 22 MiB) (MysqlDump)
  DEBUG   Trying to download https://xyz.de/ts-y-e2iKz/dump.sql.enc
 [23522147/23522147] ████████████████████████████████████████████████ 100% | 20s
 INFO  Downloading: Resources (PublicFiles: 4.0 KiB) (PublicFiles)
  DEBUG   Trying to download https://xyz.de/ts-y-e2iKz/Resources.index.json.enc
 [311/311] ███████████████████████████████████████████████████████████ 100% | 0s
  DEBUG   Trying to download https://xyz.de/Web/_Resources/Persistent                                                                                                             
  DEBUG   error trying to load https://xyz.de/Web/_Resources/Persistent - wrong status code: 404                                                                                  
  FATAL   Error with file type PublicFiles: error on downloading <BASE>/./Web/_Resources/Persistent to Resources/_/R/e/s/_Resources: file meta.json.enc not found                     
 [0/4096]  0% | 0spanic: 

goroutine 1 [running]:
github.com/pterm/pterm.checkFatal(...)
        github.com/pterm/pterm@v0.12.49/prefix_printer.go:348
github.com/pterm/pterm.(*PrefixPrinter).Printfln(0xc8f300, {0x907a72, 0x1b}, {0xc0001956d8, 0x2, 0x2})
        github.com/pterm/pterm@v0.12.49/prefix_printer.go:290 +0x1e8
github.com/sandstorm/synco/pkg/receive/cmd.glob..func1(0xc90fe0?, {0xc00021e270?, 0x3?, 0x3?})
        github.com/sandstorm/synco@v1.0.0/pkg/receive/cmd/receive-cmd.go:90 +0xab9
github.com/spf13/cobra.(*Command).execute(0xc90fe0, {0xc00021e210, 0x3, 0x3})
        github.com/spf13/cobra@v1.4.0/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc90d60)
        github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.4.0/command.go:902
github.com/sandstorm/synco/cmd.Execute()
        github.com/sandstorm/synco@v1.0.0/cmd/root.go:47 +0x85
main.main()
        github.com/sandstorm/synco@v1.0.0/main.go:23 +0xa5