Error with --HMR option in Nativescript-Vue 2.2.0
See original GitHub issueVersion
2.2.0
Reproduction link
https://github.com/hoatructhanhlam/bug-hmr-nativescript-vue
Platform and OS info
Android 7.0
Steps to reproduce
tns run android --hmr
What is expected?
After the launch, the page transfer application is normal with
this.$navigateTo(Template)
But after app rerender with --hmr option, if redirect to new page, will get exception
What is actually happening?
System.err: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
System.err: at android.view.ViewGroup.addViewInner(ViewGroup.java:5161)
System.err: at android.view.ViewGroup.addView(ViewGroup.java:4991)
System.err: at android.view.ViewGroup.addView(ViewGroup.java:4931)
System.err: at android.view.ViewGroup.addView(ViewGroup.java:4904)
System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1427)
System.err: at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1752)
System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1821)
System.err: at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
System.err: at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2595)
System.err: at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2382)
System.err: at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2337)
System.err: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2244)
System.err: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:702)
System.err: at android.os.Handler.handleCallback(Handler.java:790)
System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:7000)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
P/S: Before that (v2.0.2), it still works great
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
HMR with typescript template · Issue #518 · nativescript-vue ...
Steps to reproduce. Install typescript version. Run npm run android --hmr . Edit the 'msg' value in the App.vue file.
Read more >Nativescript-vue + Typescript - HMR not working on Vue Class ...
When saving any file with vue class component style + typescript, It simply does not update. Give me the following error: File change...
Read more >NativeScript 7.1 - HMR Reenabled and Xcode 12.3 Support
HMR (Hot Module Replacement) is a feature that was introduced in NativeScript 5.3. With NativeScript 7 all @nativescript/webpack dependencies ...
Read more >Source - GitHub
[8.3.3](https://github.com/NativeScript/nativescript-cli/compare/v8.3.2...v8.3.3 ... vue-ts-template ... (2020-06-27) ### Bug Fixes * **react:** tns options ...
Read more >NativeScript HMR is Here - and It's On by Default! - YouTube
In this video, I take it for a test drive in NativeScript Core, NativeScript Angular, and NativeScript Vue, and see how the developer ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@hoatructhanhlam until a new version was released you can check it by doing this:
nativescript-vue
repo. Runnpm install && npm run build
inside it.nativescript-vue
dependency in your app’spackage.json
to"nativescript-vue": "file://path/to/nativescript-vue"
node_modules/nativescript-vue
directory and runnpm install
again. You should have a symbolic link to the git version.tns run android --hmr
@hoatructhanhlam good news! @rigor789 just released a new 2.2.1 version which includes my fix. I’ve just tested it with your repo (changing your
package.json
dependency to^2.2.1
) and it works.I will close the issue. Please re-open if there is something I missed.