go-flutter-desktop / go-flutter

Flutter on Windows, MacOS and Linux - based on Flutter Embedding, Go and GLFW.
https://hover.build/
BSD 3-Clause "New" or "Revised" License
5.85k stars 283 forks source link

unable to run example app for go-flutter plugin #562

Closed Dolaned closed 3 years ago

Dolaned commented 3 years ago

Hover doctor

hover: Hover version v0.46.1 running on darwin
hover: Sharing packaging tools
hover: darwin-bundle is supported
hover: darwin-dmg is supported
hover: darwin-pkg is supported
hover: Packaging linux-appimage is not supported on darwin
hover: To still package linux-appimage on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-deb is not supported on darwin
hover: To still package linux-deb on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-pkg is not supported on darwin
hover: To still package linux-pkg on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-rpm is not supported on darwin
hover: To still package linux-rpm on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-snap is not supported on darwin
hover: To still package linux-snap on darwin you need to run hover with the `--docker` flag.
hover: Packaging windows-msi is not supported on darwin
hover: To still package windows-msi on darwin you need to run hover with the `--docker` flag.
hover: 
hover: Sharing flutter version
Flutter 1.25.0-8.3.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5d36f2e7f5 (5 days ago) • 2021-01-14 15:57:49 -0800
Engine • revision 7a8f8ca02c
Tools • Dart 2.12.0 (build 2.12.0-133.7.beta)
hover: Flutter engine commit: https://github.com/flutter/engine/commit/7a8f8ca02c276dce02f8dd42a44e776ac03fa9bc
hover: Finding out the C compiler version

Error output

Using hover run to run the example, I get the following error:

hover: Missing/Empty `version` field in pubspec.yaml. Please add it or otherwise you may publish your app with a wrong version. Continuing with `0.0.1` as a placeholder version.
hover: Using engine from cache
hover: Cleaning the build directory
hover: Bundling flutter app
hover: Failed to retrieve the organization name: open android/app/src/main/AndroidManifest.xml: no such file or directory
hover: Compiling 'go-flutter' and plugins
cmd/import-flutter_zmq-plugin.go:7:2: github.com/dolaned/flutter_zmq/go@v0.0.0-00010101000000-000000000000: replacement directory /home/dolaned/flutter_zmq/go does not exist
hover: Go build failed: exit status 1

Hi guys just trying to build a plugin to bring ZMQ to flutter with go, also looking for collaborators if anyone is interested, thanks!

provokateurin commented 3 years ago

I guess you are using a replace directive in your go.mod and the directory it points to does not exist.

Dolaned commented 3 years ago

hey mate, im just using the default settings, will have a look now

provokateurin commented 3 years ago

Can you please share the complete output of hover doctor?

Dolaned commented 3 years ago

i didnt realise there was more, sorry

dylanaird@Dylans-MacBook-Pro flutter_zmq % hover doctor
hover: Hover version v0.46.1 running on darwin
hover: Sharing packaging tools
hover: darwin-bundle is supported
hover: darwin-dmg is supported
hover: darwin-pkg is supported
hover: Packaging linux-appimage is not supported on darwin
hover: To still package linux-appimage on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-deb is not supported on darwin
hover: To still package linux-deb on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-pkg is not supported on darwin
hover: To still package linux-pkg on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-rpm is not supported on darwin
hover: To still package linux-rpm on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-snap is not supported on darwin
hover: To still package linux-snap on darwin you need to run hover with the `--docker` flag.
hover: Packaging windows-msi is not supported on darwin
hover: To still package windows-msi on darwin you need to run hover with the `--docker` flag.
hover: 
hover: Sharing flutter version
Flutter 1.25.0-8.3.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5d36f2e7f5 (5 days ago) • 2021-01-14 15:57:49 -0800
Engine • revision 7a8f8ca02c
Tools • Dart 2.12.0 (build 2.12.0-133.7.beta)
hover: Flutter engine commit: https://github.com/flutter/engine/commit/7a8f8ca02c276dce02f8dd42a44e776ac03fa9bc
hover: Finding out the C compiler version
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin20.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
hover: Sharing the content of go.mod
hover: Failed to read go.mod: open go/go.mod: no such file or directory
hover: file hover.yaml not found: open go/hover.yaml: no such file or directory
hover: Sharing the content of go/cmd
provokateurin commented 3 years ago

From what I see you didn't initialize go-flutter in your project. Run hover init

Dolaned commented 3 years ago

ok that was from outside the example directory in the root plugin folder, when i run it in the example directory i get this

dylanaird@Dylans-MacBook-Pro example % hover doctor                                        
hover: Hover version v0.46.1 running on darwin
hover: Sharing packaging tools
hover: darwin-bundle is supported
hover: darwin-dmg is supported
hover: darwin-pkg is supported
hover: Packaging linux-appimage is not supported on darwin
hover: To still package linux-appimage on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-deb is not supported on darwin
hover: To still package linux-deb on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-pkg is not supported on darwin
hover: To still package linux-pkg on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-rpm is not supported on darwin
hover: To still package linux-rpm on darwin you need to run hover with the `--docker` flag.
hover: Packaging linux-snap is not supported on darwin
hover: To still package linux-snap on darwin you need to run hover with the `--docker` flag.
hover: Packaging windows-msi is not supported on darwin
hover: To still package windows-msi on darwin you need to run hover with the `--docker` flag.
hover: 
hover: Sharing flutter version
Flutter 1.25.0-8.3.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5d36f2e7f5 (5 days ago) • 2021-01-14 15:57:49 -0800
Engine • revision 7a8f8ca02c
Tools • Dart 2.12.0 (build 2.12.0-133.7.beta)
hover: Flutter engine commit: https://github.com/flutter/engine/commit/7a8f8ca02c276dce02f8dd42a44e776ac03fa9bc
hover: Finding out the C compiler version
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin20.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
hover: Sharing the content of go.mod
module flutter_zmq_example/go

go 1.15

require (
    github.com/go-flutter-desktop/go-flutter v0.42.0
    github.com/pkg/errors v0.9.1
)

replace github.com/dolaned/flutter_zmq/go => /home/dolaned/flutter_zmq/go
hover: Sharing the content of hover.yaml
application-name: ""
executable-name: ""
package-name: ""
license: ""
target: lib/main.dart
branch: ""
cache-path: ""
opengl: ""
engine-version: ""
hover: Sharing the content of go/cmd
go/cmd/import-flutter_zmq-plugin.go go/cmd/main.go  go/cmd/options.go
dylanaird@Dylans-MacBook-Pro example % hover run   
hover: Missing/Empty `version` field in pubspec.yaml. Please add it or otherwise you may publish your app with a wrong version. Continuing with `0.0.1` as a placeholder version.
hover: Using engine from cache
hover: Cleaning the build directory
hover: Bundling flutter app
hover: Failed to retrieve the organization name: open android/app/src/main/AndroidManifest.xml: no such file or directory
hover: Compiling 'go-flutter' and plugins
cmd/import-flutter_zmq-plugin.go:7:2: github.com/dolaned/flutter_zmq/go@v0.0.0-00010101000000-000000000000: replacement directory /home/dolaned/flutter_zmq/go does not exist
hover: Go build failed: exit status 1

ive tried adding a macos entry point but i must be doing something wrong

provokateurin commented 3 years ago

You don't need a MacOS entry point. You have replace github.com/dolaned/flutter_zmq/go => /home/dolaned/flutter_zmq/go in your go.mod file and the directory you are pointing to doesn't exist.

Dolaned commented 3 years ago

ok ive fixed that directory issue, now i get this

dylanaird@Dylans-MacBook-Pro example % hover run
hover: Missing/Empty `version` field in pubspec.yaml. Please add it or otherwise you may publish your app with a wrong version. Continuing with `0.0.1` as a placeholder version.
hover: Using engine from cache
hover: Cleaning the build directory
hover: Bundling flutter app
hover: Checking available release on Github
hover: Checking available release on Github
hover: Failed to retrieve the organization name: open android/app/src/main/AndroidManifest.xml: no such file or directory
hover: Compiling 'go-flutter' and plugins
go: found github.com/dolaned/flutter_zmq/go in github.com/dolaned/flutter_zmq/go v0.0.0-00010101000000-000000000000
go: flutter_zmq_example/go/cmd imports
        github.com/dolaned/flutter_zmq/go: parsing ../../go/go.mod: open /Users/dylanaird/Documents/projects/flutter_zmq/go/go.mod: no such file or directory
hover: Go build failed: exit status 1

that folder is bare and only contains a few things including the plugin

provokateurin commented 3 years ago

Please check if that file exists. This is not a go-flutter specific question and you should look up answers / ask questions on Stackoverflow and the like.

Dolaned commented 3 years ago

oh i thought this was caused by me trying to make a plugin for go flutter.

provokateurin commented 3 years ago

The problem you are having is a problem with go and it's dependency resolution.

Dolaned commented 3 years ago

ok no worries will close issue look forward to making my PR with the plugin :)