-
Notifications
You must be signed in to change notification settings - Fork 258
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
Hashes are the same but there is a hash mismatch shown #1960
Comments
Hi! Thanks for opening your first issue here! 😄 |
Hi, could you please show a self-contained minimal reproducible sample? (possibly a github repo). especially I am interested in seeing frb_generated.rs and frb_generated.dart to see whether the numbers match. In addition, maybe related: #1932, i.e. maybe the old compiled Rust binary is somehow used by the compilation toolchain. Thus, maybe try to
and also feel free to provide more details about your compilation toolchain (how it is compiled), maybe we can report/fix if it is a bug of it. |
Here is a git repo with a minimal reproduction. I am curious to see if it works on your system and not just localized to me. I did check the hashes using this command: |
I agree, the hash is the same.
Weirdly, both numbers are not the ones in your repo (977052611)! One way is to add a few |
Actually the reason for the number being different from the one I reported is due to me remaking the project in a new project in order to minify it. If I were to build that project I would get the first of the two hashes for both. I can try to add the print statements tomorrow. I agree that it may be an environment related issues, though I need someone else to run it to make sure. I'll try to get someone to try it out tomorrow as well. |
I see, then it looks like Rust compilation problem.
Maybe, after the files are modified, try to delete the whole |
I already attempted those steps under the new and old project. I believe the only thing it could be is either a bug or something to do with my environment. I will try and check today if it is my environment and update accordingly. |
I tried to run it locally, but it yields the following compilation error. It looks fixable, but since it is unrelated to flutter_rust_bridge, I guess if there is a minimal reproducible sample that can directly compile, I will try to run it locally and see whether it works.
|
I had encountered this issue before as well |
I figured out the issue and it had nothing to do with flutter_rust_bridge hence the closing of this issue. |
Happy to see it is solved! |
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. |
Describe the bug
Encountered the hash mismatch even when the hashes were the same. Made a new project and just added the cargo.toml dependencies and my single rust file, and the bug reappears.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: Content hash on Dart side (496887197) is different from Rust side (-1918914929), indicating out-of-sync code. This may happen when, for example, the Dart code is hot-restarted/hot-reloaded without recompiling Rust code. (Note: This is just a sanity check. Even if content hash does not change, the code may still change and needs to be recompiled)
Steps to reproduce
Logs
Expected behavior
No response
Generated binding code
No response
OS
Windows
Version of
flutter_rust_bridge_codegen
2.0.0-dev.34 & 2.0.0-dev.33
Flutter info
Version of
clang++
Android (11695104, based on r522817) clang version 18.0.1
Additional context
No response
The text was updated successfully, but these errors were encountered: