Skip to content
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

React app just shows white screen #42

Open
abemedia opened this issue Apr 29, 2020 · 1 comment
Open

React app just shows white screen #42

abemedia opened this issue Apr 29, 2020 · 1 comment

Comments

@abemedia
Copy link

I have a react app built with CRA which works fine in the browser but only displays a white screen here. I added some static HTML to the index file and that works without an issue so it appears its just having issues running the react app.

The react app works fine in Chrome/FF/WebkitGtk (using https://github.com/zserge/webview) so my feeling is that it's something that isn't implemented in Ultralight but without seeing the console output its hard to say.

Is there any way we can get the console output from Ultralight? Like a debug flag or something?

@Tarinaky
Copy link

Tarinaky commented Sep 27, 2022

What I did was manually edit muon.go to add

func loggingCallback() func(user_data unsafe.Pointer, caller ULView, source ULMessageSource, level ULMessageLevel, message ULString, line_number uint32, column_number uint32, source_id ULString) {
	return func(user_data unsafe.Pointer, caller ULView, source ULMessageSource, level ULMessageLevel, message ULString, line_number uint32, column_number uint32, source_id ULString) {
		s := unsafe.Pointer(UlStringGetData(message))
		sz := UlStringGetLength(message)
		wstr := (*[256]uint16)(s)[:sz:sz]

		out := utf16.Decode(wstr)
		fmt.Println(string(out))
	}
}

and then in (window*) Start() on line 107 I added UlViewSetAddConsoleMessageCallback(w.view, loggingCallback(), nil)

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

No branches or pull requests

2 participants