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

Cannot mock RustLib without loading FFI #2247

Closed
Tienisto opened this issue Aug 15, 2024 · 3 comments · Fixed by #2248
Closed

Cannot mock RustLib without loading FFI #2247

Tienisto opened this issue Aug 15, 2024 · 3 comments · Fixed by #2248
Labels
awaiting Waiting for responses, PR, further discussions, upstream release, etc bug Something isn't working

Comments

@Tienisto
Copy link
Contributor

Tienisto commented Aug 15, 2024

Describe the bug

Following the instructions in https://cjycode.com/flutter_rust_bridge/guides/how-to/test
does not work.

I get the following error:

Invalid argument(s): Failed to load dynamic library 'rhttp.dll': error code 126
  dart:ffi                                                                new DynamicLibrary.open
  package:flutter_rust_bridge/src/platform_types/_io.dart 42:47           new ExternalLibrary.open
  package:flutter_rust_bridge/src/loader/_io.dart 62:46                   loadExternalLibraryRaw.<fn>
  package:flutter_rust_bridge/src/loader/_io.dart 49:22                   loadExternalLibraryRaw.tryAssumingNonPackaged
  package:flutter_rust_bridge/src/loader/_io.dart 61:12                   loadExternalLibraryRaw
  package:flutter_rust_bridge/src/loader/_io.dart 14:10                   loadExternalLibrary
  package:flutter_rust_bridge/src/main_components/entrypoint.dart 129:13  BaseEntrypoint._loadDefaultExternalLibrary
  package:flutter_rust_bridge/src/main_components/entrypoint.dart 48:31   BaseEntrypoint.initImpl
  package:rhttp/src/rust/frb_generated.dart 30:20                         RustLib.init

Steps to reproduce

Follow instructions in https://cjycode.com/flutter_rust_bridge/guides/how-to/test

Logs

Should not be needed

Expected behavior

No response

Generated binding code

No response

OS

Windows 11

Version of flutter_rust_bridge_codegen

2.1.0

Flutter info

No response

Version of clang++

No response

Additional context

No response

@Tienisto Tienisto added the bug Something isn't working label Aug 15, 2024
Copy link

welcome bot commented Aug 15, 2024

Hi! Thanks for opening your first issue here! 😄

@Tienisto Tienisto mentioned this issue Aug 15, 2024
5 tasks
@fzyzcjy
Copy link
Owner

fzyzcjy commented Aug 15, 2024

Good point and fix (#2248)!

@fzyzcjy fzyzcjy added the awaiting Waiting for responses, PR, further discussions, upstream release, etc label Aug 15, 2024
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting Waiting for responses, PR, further discussions, upstream release, etc bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants