Skip to content

windows image error #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RayMeibergen opened this issue Jul 17, 2020 · 6 comments
Closed

windows image error #494

RayMeibergen opened this issue Jul 17, 2020 · 6 comments

Comments

@RayMeibergen
Copy link

hi

when I build with windows.
I can not get image.

  • build
docker run \
--rm \
--mount type=bind,source=$(pwd),target=/app \
--mount type=bind,source=/tmp/hover/engine,target=/root/.cache/hover/engine \
--mount type=bind,source=/tmp/hover/cross-compile/cache,target=/cache \
--mount type=bind,source=/tmp/.pub-cache,target=/root/.pub-cache \
--env GOCACHE=/cache \
--env GOPROXY=${GOPROXY:-} \
--env GOPRIVATE=${GOPRIVATE:-} \
--env HOVER_DISABLE_INTERACTIONS=yes \
goflutter/hover:latest \
bash -c "
    hover build windows &&
    chown -R $(id -u):$(id -g) /app &&
    chown -R $(id -u):$(id -g) /root/.cache/hover/engine &&
    chown -R $(id -u):$(id -g) /cache &&
    chown -R $(id -u):$(id -g) /root/.pub-cache"
  • sample code
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Image.network("https://switch-box.net/wp-content/uploads/2012/11/free-soft-caesium-image-compression-01.jpg")
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);

when I run with mac I can get image


image

but with windows, I get just a box.


image

Is this a bug?

@pchampio
Copy link
Member

The docker image goflutter/hover might be using an older version of flutter.
Could you try to update the flutter version inside de image

@RayMeibergen
Copy link
Author

hi @pchampio

thanks for reply!
I updated my flutter., but it's same...

I made a new image for this!

rhemsjapan/goflutter-hover:latest

root@b901de92b2f9:/app# flutter upgrade
Flutter is already up to date on channel stable
Flutter 1.17.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8af6b2f038 (2 weeks ago) • 2020-06-30 12:53:55 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4

@provokateurin
Copy link
Member

I think there was a similar issue a few weeks ago. I'll do a quick search

@provokateurin
Copy link
Member

#469 this looks pretty similar so I guess this is a duplicate. Anyway @pchampio suggested that the errors may come from virtualization. So @RayMeibergen are you running the Windows app in a VM?

@RayMeibergen
Copy link
Author

yes!
I'm checking this with Parallels Desktop!

@RayMeibergen
Copy link
Author

found the solution!

add this "-opengl=none" and it's working now!!!
thanks for information!!!
and thanks for help!

docker run \
--rm \
--mount type=bind,source=$(pwd),target=/app \
--mount type=bind,source=/tmp/hover/engine,target=/root/.cache/hover/engine \
--mount type=bind,source=/tmp/hover/cross-compile/cache,target=/cache \
--mount type=bind,source=/tmp/.pub-cache,target=/root/.pub-cache \
--env GOCACHE=/cache \
--env GOPROXY=${GOPROXY:-} \
--env GOPRIVATE=${GOPRIVATE:-} \
--env HOVER_DISABLE_INTERACTIONS=yes \
goflutter/hover:latest \
bash -c "
    hover build windows --opengl=none &&
    chown -R $(id -u):$(id -g) /app &&
    chown -R $(id -u):$(id -g) /root/.cache/hover/engine &&
    chown -R $(id -u):$(id -g) /cache &&
    chown -R $(id -u):$(id -g) /root/.pub-cache"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants