no window show on macos
goodking-bq opened this issue · comments
Device:
- OS: [MacOS]
- Version: 13.6
- Go Version: 14.3
Describe the bug
when i run command guark dev
❯ guark dev
✔ UI server started successfully.
✔ Starting guark dev app...
DEBU[0000] config loaded. context=guark
DEBU[0000] Initialize plugins. context=guark
DEBU[0000] Init: dialog plugin. context=app
DEBU[0000] Init: notify plugin. context=app
DEBU[0000] Init: clipboard plugin. context=app
DEBU[0000] Plugins Initialized. context=guark
DEBU[0000] starting guark server. context=guark
DEBU[0000] Starting new window. context=guark
DEBU[0000] ---- HOOK: App created! ---- context=app
DEBU[0000] ---- HOOK: App mounted! ---- context=app
all looks right.app run but no window show.
created and mounted hooks is executed by javascript:
https://github.com/guark/vue/blob/6aa8067231a7710cfa41ef6cfa1743ad59b206e5/ui/src/App.vue#L43
can you try the app with: guark build
created and mounted hooks is executed by javascript:
https://github.com/guark/vue/blob/6aa8067231a7710cfa41ef6cfa1743ad59b206e5/ui/src/App.vue#L43can you try the app with:
guark build
created and mounted hooks is executed by javascript:
https://github.com/guark/vue/blob/6aa8067231a7710cfa41ef6cfa1743ad59b206e5/ui/src/App.vue#L43can you try the app with:
guark build
here is my all steps:
❯ mkdir guarkapp
❯ cd guarkapp
❯ guark new --template vue
✔ Remote template validated
✔ Template downloaded successfully.
✔ App module name: github.com/melbahja/hello█
✔ App module name refactored
⏺ UI setup commands (Verify them before confirm):
- yarn install
✔ You allowed setup commands: Y█
yarn install v1.22.4
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > sass-loader@8.0.2" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
warning " > uglifyjs-webpack-plugin@2.2.0" has unmet peer dependency "webpack@^4.0.0".
[4/4] 🔨 Building fresh packages...
✨ Done in 12.29s.
✔ Done! cd to /Volumes/work/guarkapp and run `guark dev`.
❯ guark dev
✔ UI server started successfully.
✔ Starting guark dev app...
DEBU[0000] config loaded. context=guark
DEBU[0000] Initialize plugins. context=guark
DEBU[0000] Init: dialog plugin. context=app
DEBU[0000] Init: notify plugin. context=app
DEBU[0000] Init: clipboard plugin. context=app
DEBU[0000] Plugins Initialized. context=guark
DEBU[0000] starting guark server. context=guark
DEBU[0000] Starting new window. context=guark
DEBU[0000] ---- HOOK: App created! ---- context=app
DEBU[0000] ---- HOOK: App mounted! ---- context=app
❯ guark build
✔ Start building...
✔ Guark build initialized ⚙️
✔ Guark UI builded 🙈
✔ Guark UI assets indexed 🙉
✔ Guark build for darwin 🙊
✔ Guark build finished 🚀🚀
❯ tree dist
dist
└── darwin
└── Contents
├── MacOS
│ └── dev.guark.myapp
├── README_PLEASE
├── Resources
│ ├── assets
│ │ ├── 007d1b6d-0f7b-4057-ba64-62db009ce5f9
│ │ ├── 336139dd-a6a4-4d5f-8e8a-fd6bce526c58
│ │ ├── 3513ca9d-e2b1-4425-b007-28f1abeda51c
│ │ ├── 55f1fc5f-bb2c-4162-bc37-a7bb9372d3fa
│ │ ├── 668a8695-6362-4683-8bd0-2d9f2283f523
│ │ ├── 8c05ae88-d828-4487-8dc5-227d652bf9c6
│ │ └── 8f052946-ed65-41e3-978e-12c4d55d0679
│ └── dev.guark.myapp.icns
└── info.plist
5 directories, 11 files
when i run guark dev ,no window.
when i run build app cd dist && mv darwin darwin.app&& open darwin.app
app run ,but no window too.
anythings wrong??
the App.vue is
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view/>
</div>
</template>
<style lang="scss">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>
<script>
import g from "guark"
export default {
name: "App",
created()
{
// Call created hook when your UI app created.
g.hook("created")
},
mounted()
{
// Call guark mounted hook when your ui dom ready.
// You should call hooks one time only...
g.hook("mounted")
}
}
</script>
I will push some changes today perhaps that will work, I will notify you to test them.
I pull latest just now ,I got the same issue
Can you check system logs for guark dev
process ?
Jun 22 09:11:57 172-0-15-5 com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
just log like this when run guark dev*
how to install dev 0.1.0?
dev v0.1.0 not ready to test yet, I will install macOS on a VM to see what cause the issue.
To make sure that the issue is in guark try this:
package main
import "github.com/zserge/webview"
func main() {
debug := true
w := webview.New(debug)
defer w.Destroy()
w.SetTitle("Minimal webview example")
w.SetSize(800, 600, webview.HintNone)
w.Navigate("https://en.m.wikipedia.org/wiki/Main_Page")
w.Run()
}
If no window shown that's zserge/webview
issue.
dev v0.1.0 not ready to test yet, I will install macOS on a VM to see what cause the issue.
To make sure that the issue is in guark try this:
package main import "github.com/zserge/webview" func main() { debug := true w := webview.New(debug) defer w.Destroy() w.SetTitle("Minimal webview example") w.SetSize(800, 600, webview.HintNone) w.Navigate("https://en.m.wikipedia.org/wiki/Main_Page") w.Run() }If no window shown that's
zserge/webview
issue.
I run guark
on MacOS, and no window show too.
but, running zserge/webview
is ok. (like below image)
OK, I found something whappend.
After I edited guark.yaml
, change windows.hint
to 0
, then window shown.
...
window:
width: 950
height: 700
# 0 Width and height are default size
# 1 Width and height are minimum bounds
# 2 Width and height are maximum bounds
# 3 Window size can not be changed by a user
hint: 0 ### <--- this is what I edited.
...
OK, I found something whappend.
After I editedguark.yaml
, changewindows.hint
to0
, then window shown.... window: width: 950 height: 700 # 0 Width and height are default size # 1 Width and height are minimum bounds # 2 Width and height are maximum bounds # 3 Window size can not be changed by a user hint: 0 ### <--- this is what I edited. ...
Very Usefull .
@yam8511 thank you 🙏
guys v0.1.0 released, you can check it 😄
guys v0.1.0 released, you can check it 😄
good work!! but can't got window .also add hint: 0