-
Notifications
You must be signed in to change notification settings - Fork 75
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
local.ts example doesn't work on macos #100
Comments
Does the |
Can confirm doesn't work. |
@lucsoft any idea where it might be failing? Not sure if we need to beef up some logs? cc @littledivy |
Nope no idea |
Is it working for anybody else on Windows Linux Mac Intel (non-arm64)? |
It works for me both on windows and ubuntu (WSL). |
Can confirm it also does not work on my Intel Mac. |
do we have a guess on what to debug/where to add logs? |
Aw snap, I was so hyped after hearing about the latest release. Doesn't work for me as well on this system:
|
@eliassjogreen I don't know a lot about rust so maybe I'm doing something wrong, anyways, after cloning https://github.com/denoland/deno I DetailsUpdating crates.io index
Downloaded futures-task v0.3.19
Downloaded getrandom v0.2.4
Downloaded serde v1.0.133
Downloaded tokio-rustls v0.23.2
Downloaded serde_json v1.0.75
Downloaded itoa v1.0.1
Downloaded version_check v0.9.4
Downloaded typenum v1.15.0
Downloaded pin-project-lite v0.2.8
Downloaded futures-macro v0.3.19
Downloaded futures-util v0.3.19
Downloaded h2 v0.3.10
Downloaded futures-sink v0.3.19
Downloaded futures v0.3.19
Downloaded tokio-macros v1.7.0
Downloaded anyhow v1.0.53
Downloaded syn v1.0.85
Downloaded futures-io v0.3.19
Downloaded futures-executor v0.3.19
Downloaded futures-core v0.3.19
Downloaded futures-channel v0.3.19
Downloaded indexmap v1.8.0
Downloaded ryu v1.0.9
Downloaded proc-macro2 v1.0.36
Downloaded smallvec v1.8.0
Downloaded ppv-lite86 v0.2.16
Downloaded generic-array v0.14.5
Downloaded serde_derive v1.0.133
Downloaded quote v1.0.14
Downloaded once_cell v1.9.0
Downloaded 30 crates (1.4 MB) in 1.11s
Compiling libc v0.2.106
Compiling proc-macro2 v1.0.36
Compiling unicode-xid v0.2.2
Compiling cfg-if v1.0.0
Compiling syn v1.0.85
Compiling memchr v2.4.1
Compiling log v0.4.14
Compiling autocfg v1.0.1
Compiling pin-project-lite v0.2.8
Compiling futures-core v0.3.19
Compiling bytes v1.1.0
Compiling version_check v0.9.4
Compiling typenum v1.15.0
Compiling futures-channel v0.3.19
Compiling scopeguard v1.1.0
Compiling smallvec v1.8.0
Compiling cfg-if v0.1.10
Compiling futures-sink v0.3.19
Compiling futures-task v0.3.19
Compiling futures-util v0.3.19
Compiling cc v1.0.72
Compiling futures-io v0.3.19
Compiling pin-utils v0.1.0
Compiling once_cell v1.9.0
Compiling fnv v1.0.7
Compiling slab v0.4.5
Compiling tinyvec_macros v0.1.0
Compiling itoa v0.4.8
Compiling httparse v1.5.1
Compiling ppv-lite86 v0.2.16
Compiling spin v0.5.2
Compiling untrusted v0.7.1
Compiling matches v0.1.9
Compiling percent-encoding v2.1.0
Compiling unicode-bidi v0.3.7
Compiling lazy_static v1.4.0
Compiling serde_derive v1.0.133
Compiling base64 v0.13.0
Compiling cpufeatures v0.2.1
Compiling serde v1.0.133
Compiling opaque-debug v0.3.0
Compiling hashbrown v0.11.2
Compiling serde_json v1.0.75
Compiling anyhow v1.0.53
Compiling utf-8 v0.7.6
Compiling try-lock v0.2.3
Compiling byteorder v1.4.3
Compiling ryu v1.0.9
Compiling itoa v1.0.1
Compiling tower-service v0.3.1
Compiling regex-syntax v0.6.25
Compiling remove_dir_all v0.5.3
Compiling httpdate v1.0.2
Compiling instant v0.1.12
Compiling tokio v1.14.0
Compiling indexmap v1.8.0
Compiling generic-array v0.14.5
Compiling lock_api v0.4.5
Compiling tinyvec v1.5.1
Compiling http v0.2.4
Compiling form_urlencoded v1.0.1
Compiling tracing-core v0.1.21
Compiling rustls-pemfile v0.2.1
Compiling ring v0.16.20
Compiling tracing v0.1.29
Compiling unicode-normalization v0.1.19
Compiling http-body v0.4.4
Compiling want v0.3.0
Compiling quote v1.0.14
Compiling aho-corasick v0.7.18
Compiling parking_lot_core v0.8.0
Compiling getrandom v0.2.4
Compiling signal-hook-registry v1.4.0
Compiling num_cpus v1.13.0
Compiling mio v0.7.14
Compiling errno v0.1.8
Compiling socket2 v0.4.2
Compiling os_pipe v0.9.2
Compiling atty v0.2.14
Compiling idna v0.2.3
Compiling regex v1.5.4
Compiling parking_lot v0.11.1
Compiling rand_core v0.6.3
Compiling pty v0.2.2
Compiling block-buffer v0.9.0
Compiling digest v0.9.0
Compiling url v2.2.2
Compiling rand_chacha v0.3.1
Compiling sha-1 v0.9.8
Compiling webpki v0.22.0
Compiling sct v0.7.0
Compiling rand v0.8.4
Compiling rustls v0.20.2
Compiling tempfile v3.2.0
Compiling tokio-macros v1.7.0
Compiling futures-macro v0.3.19
Compiling thiserror-impl v1.0.30
Compiling async-stream-impl v0.3.2
Compiling async-stream v0.3.2
Compiling thiserror v1.0.30
Compiling tungstenite v0.16.0
Compiling futures-executor v0.3.19
Compiling futures v0.3.19
Compiling tokio-util v0.6.9
Compiling tokio-tungstenite v0.16.1
Compiling tokio-rustls v0.23.2
Compiling h2 v0.3.10
Compiling hyper v0.14.16
Compiling test_util v0.1.0 (/Volumes/hdd1/projects/deno/test_util)
Compiling test_ffi v0.1.0 (/Volumes/hdd1/projects/deno/test_ffi)
Finished test [unoptimized + debuginfo] target(s) in 3m 04s
Running unittests (/Volumes/hdd1/projects/deno/target/debug/deps/test_ffi-b19178236f050129)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/integration_tests.rs (/Volumes/hdd1/projects/deno/target/debug/deps/integration_tests-11476d6156348c08)
running 2 tests
test symbol_types ... FAILED
test basic ... FAILED
failures:
---- symbol_types stdout ----
stdout
stderr error: TS2345 [ERROR]: Argument of type '{ readonly method1: { readonly parameters: readonly ["usize", "usize"]; readonly result: "void"; }; readonly method2: { readonly parameters: readonly ["void"]; readonly result: "void"; }; readonly method3: { readonly parameters: readonly [...]; readonly result: "void"; }; ... 15 more ...; readonly method19: { ...; }...' is not assignable to parameter of type 'Record<string, ForeignFunction>'.
Property 'method1' is incompatible with index signature.
Type '{ readonly parameters: readonly ["usize", "usize"]; readonly result: "void"; }' is not assignable to type 'ForeignFunction'.
Types of property 'parameters' are incompatible.
The type 'readonly ["usize", "usize"]' is 'readonly' and cannot be assigned to the mutable type '(NativeType | "buffer")[]'.
{
^
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:7:3
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
remote.symbols.method15({} as Deno.UnsafePointer);
~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:91:36
TS2322 [ERROR]: Type 'unknown' is not assignable to type 'number'.
let r_1: number = result;
~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:96:5
TS2571 [ERROR]: Object is of type 'unknown'.
result2.then((_1: number) => {});
~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:101:1
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
let r3_1: Deno.UnsafePointer = result3;
~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:106:16
TS2571 [ERROR]: Object is of type 'unknown'.
result4.then((_1: Deno.UnsafePointer) => {});
~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:111:1
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
result4.then((_1: Deno.UnsafePointer) => {});
~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:111:24
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
const ptr = new Deno.UnsafePointer(0n);
~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:113:22
TS2339 [ERROR]: Property 'UnsafeFnPointer' does not exist on type 'typeof Deno'.
const fnptr = new Deno.UnsafeFnPointer(
~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:114:24
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:30:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid return type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:32:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:36:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:40:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:44:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:48:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:52:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:56:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:60:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:64:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:68:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:72:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:76:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:80:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:84:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:88:1
TS2578 [ERROR]: Unused '@ts-expect-error' directive.
// @ts-expect-error: Invalid argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/ffi_types.ts:121:1
Found 26 errors.
ExitStatus(unix_wait_status(256))
thread 'symbol_types' panicked at 'assertion failed: output.status.success()', test_ffi/tests/integration_tests.rs:98:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- basic stdout ----
stdout
stderr error: Uncaught AssertionError: Expected error message to include "Failed to register symbol non_existent_symbol", but got "Could not obtain symbol from the library: dlsym(0x233f61240, non_existent_symbol): symbol not found".
throw new AssertionError(msg);
^
at assertIsError (file:///Volumes/hdd1/projects/deno/test_util/std/testing/asserts.ts:634:11)
at assertThrows (file:///Volumes/hdd1/projects/deno/test_util/std/testing/asserts.ts:690:5)
at file:///Volumes/hdd1/projects/deno/test_ffi/tests/test.js:21:1
ExitStatus(unix_wait_status(256))
thread 'basic' panicked at 'assertion failed: output.status.success()', test_ffi/tests/integration_tests.rs:44:3
failures:
basic
symbol_types
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.34s
error: test failed, to rerun pass '--test integration_tests' I believe that's wrong so now I ran Copying something
[1, 2, 3, 4, 5, 6, 7, 8]
[1, 2, 3, 4, 5, 6, 7, 8] [9, 10]
[1, 2, 3, 4, 5, 6, 7, 8]
[ 1, 2, 3, 4, 5, 6 ]
[ 4, 5, 6 ]
[ 4, 5, 6 ]
Hello from pointer!
pointer!
false
true
false
579
true
579
579
579
579
579
579
579.9119873046875
579.912
After sleep_blocking
true
Before
true
After
true
Correct number of resources |
Ubuntu / POP!_OS 21.10 works so that pretty much confirms it's a mac-specific bug. |
@eliassjogreen Sorry, I'm really nitpicking here but this isn't just a bug on aarch64 as I and @Julli4n have said above. I have an Intel MacBook Pro and encounter the exact same issue. |
|
Note on macos windows can only be created on the main thread |
I can't find https://docs.rs/crate/webview-official-sys/0.1.2/source/Cargo.toml
Edit: found it, in here: https://github.com/webview/webview_rust/ The sample here works fine:
|
this is most likely the culprit. it'd be cool if webview_deno |
@brandonros I admit I have no clue about low-level stuff (I don't even really know what a thread is), but to me this sounds like Deno itself needs to provide some way of choosing threads or creating a new process, right? |
FYI |
Note that the |
@littledivy thanks for that that gets
Any idea on what else I can do locally to turn up verbosity and figure out where we are getting stuck? |
I tried debugging it, it's not stuck in deno_webview but something is not working with the NSApplication event loop inside webview. (Setting |
I created a PR to fix the issue related to WebView on Darwin First: Must explicitly call set_size method on webview_sys sys.symbols.deno_webview_set_size(this.#handle, width, height, hint); I'm not sure about this one |
just shows in the dock, click it and no window to be found anywhere
The text was updated successfully, but these errors were encountered: