pydio / cells-sync

Sync Client for Pydio Cells
https://pydio.com
GNU General Public License v3.0
35 stars 15 forks source link

Cannot build #26

Closed jradxl closed 4 years ago

jradxl commented 4 years ago

Since there aren't binaries, I have tried to build, whereas I am not a Go specialist Using your instructions, which miss an "npm update" step, I end up with this error, which I have no idea how to fix. Suggestions?

There are 7 npm update deprecated warnings, amongst other warnings Surely this package needs some maintenance?

go build \
-ldflags "-X github.com/pydio/cells-sync/common.Version=0.2.0 \
-X github.com/pydio/cells-sync/common.BuildStamp=2020-04-13T16:38:40 \
-X github.com/pydio/cells-sync/common.BuildRevision=c30859c79de43efea176877c3be1fd347e44f206" \
-o cells-sync main.go
# github.com/pydio/cells-sync/cmd
../../github.com/pydio/cells-sync/cmd/webview.go:48:20: undefined: webview.Settings
make: *** [Makefile:14: cli] Error 2
jradxl commented 4 years ago

Here's the reason....

"github.com/zserge/webview" Migrating from v0.1.1 to v0.10.0 webview.Settings struct has been removed. Title, URL and size are controlled via other API setters and can be updated at any time, not only when webview is created.

jradxl commented 4 years ago

I got it to compile and run, with this change, but I don't know whether my change is valid, or causing my next problem....

// WebviewCmd opens a webview pointing to the http server URL.
var WebviewCmd = &cobra.Command{
    Use:   "webview",
    Short: "Launch WebView",
    Run: func(cmd *cobra.Command, args []string) {
        lang := i18n.JsonLang()
        if lang != "" {
            url += "?lang=" + lang
        }       
        debug := true
        w := webview.New(debug)
        defer w.Destroy()
        w.SetTitle(i18n.T("application.title"))
        w.SetSize(900, 600, webview.HintNone)
        w.Navigate(url)
        w.Dispatch(func() { w.Eval(fmt.Sprintf(`document.addEventListener ( 'DOMContentLoaded', (event) => { w.Bind("linkOpener", &LinkOpener{}) }); `)) })
        w.Run()
    },
}

I now get this error on, Pick a folder transport: received the unexpected content-type "text/html; charset=utf-8"

Pity I'll wait..

cdujeu commented 4 years ago

hello @jradxl

Since there aren't binaries,

you mean for your platform? https://pydio.com/en/get-pydio/downloads/pydiosync-desktop-app

jradxl commented 4 years ago

Well, half and half.... I did go to Google Play on my phone, and assumed that the Android app would have sync. When it didn't, I came to your site's download page and and eventually ended up at bottom, where I found PydioSync, with no download options. Alas, at that point the significance of Pydio|Cells Sync didn't occur to me, and just assumed there wasn't one. I see now I missed your TAB between Mobile and PC in the centre the page.

I had visited your github page to see if the downloads were there, where I changed from Pydio Sync to Cells Sync, and found:-

Using pre-compiled binaries
Coming soon: list and links to the pre-compiled binaries download server

So I had no reason to believe I had missed anything

cdujeu commented 4 years ago

Wowww, crappy user experience :-) Thanks for pointing this out. we'll make that better, and probably some readme is out-of-date on github

jradxl commented 4 years ago

Your compiled version still gives me:- transport: received the unexpected content-type "text/html; charset=utf-8" so now I'm more confident that I have something wrong with websockets on my Nginx reverse proxy. So that gives me something to work on next

cdujeu commented 4 years ago

Just FYI, if you ever want to build from scratch (we will update the readme) :

Due to a dependency issue, until we switch to modules or until this dependency master is stable again, you have to apply the following after calling go get and before calling the make command :

cd github.com/zserge/webview
git checkout 9c1b0a888aa40039d501c1ea9f60b22a076a25ea
jradxl commented 4 years ago

Thanks for info.. I did that, but still get transport: received the unexpected content-type "text/html; charset=utf-8" So am convinced this is an incompatibly with Cells 2.0.5

Modules version would be good, but can see that's a lot of work! Meanwhile, I've not succeeded in getting Cell-Sync running in the debuggers for VsCode or Goland. Seems it is a complex Go program!!

cdujeu commented 4 years ago

it is :-)

So am convinced this is an incompatibly with Cells 2.0.5 Nope should not be. Probably something with your proxy if you have one

jradxl commented 4 years ago

./cells start --grpc_external=33060

is listening on ipv6 only I had to reconfigure the whole of my local LAN

If you have that in your documentation, I missed it