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

又一段 Vue 无法渲染的代码 #745

Closed
cnryb opened this issue Oct 21, 2021 · 1 comment
Closed

又一段 Vue 无法渲染的代码 #745

cnryb opened this issue Oct 21, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cnryb
Copy link
Member

cnryb commented Oct 21, 2021

使用的 Kraken 版本 | What version of kraken are you using

0.8.4

重现代码 | Code example:
样例工程在这里 https://github.com/cnryb/kraken-demo/blob/master/test-case/test-case6/src/App.vue

<template>
  <div style="line-height: 20px;">
    <div style="display: inline-block; padding: 10px 200px;">1</div>
  </div>
</template>

实际结果 | Actual results:
白屏,并在控制台报错。错误详情如下:


flutter: Observatory listening on http://127.0.0.1:61141/HyRFhutC7UI=/
flutter: Kraken getting bundle for contextId: 0, path: /Users/renyuebing/Desktop/temp/kraken-demo/test-case/test-case5/dist/main.js
flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown during performLayout():
flutter: BoxConstraints has non-normalized width constraints.
flutter: These invalid constraints were provided to RenderTextBox's layout() function by the following
flutter: function, which probably computed the invalid constraints in question:
flutter:   RenderFlowLayout._layoutChildren (package:kraken/src/rendering/flow.dart:615:15)
flutter: The offending constraints were:
flutter:   BoxConstraints(0.0<=w<=-40.0, 0.0<=h<=Infinity; NOT NORMALIZED)
flutter: 
flutter: When the exception was thrown, this was the stack:
flutter: #0      BoxConstraints.debugAssertIsValid.<anonymous closure>.throwError (package:flutter/src/rendering/box.dart:517:9)
flutter: #1      BoxConstraints.debugAssertIsValid.<anonymous closure> (package:flutter/src/rendering/box.dart:552:19)
flutter: #2      BoxConstraints.debugAssertIsValid (package:flutter/src/rendering/box.dart:565:6)
flutter: #3      RenderObject.layout (package:flutter/src/rendering/object.dart:1679:24)
flutter: #4      RenderFlowLayout._layoutChildren (package:kraken/src/rendering/flow.dart:615:15)
flutter: #5      RenderFlowLayout.performLayout (package:kraken/src/rendering/flow.dart:412:5)
flutter: #6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
flutter: #7      RenderBoxModel.layout (package:kraken/src/rendering/box_model.dart:793:11)
flutter: #8      RenderFlowLayout._layoutChildren (package:kraken/src/rendering/flow.dart:615:15)
flutter: #9      RenderFlowLayout.performLayout (package:kraken/src/rendering/flow.dart:412:5)
flutter: #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
flutter: #11     RenderBoxModel.layout (package:kraken/src/rendering/box_model.dart:793:11)
flutter: #12     RenderFlowLayout._layoutChildren (package:kraken/src/rendering/flow.dart:615:15)
flutter: #13     RenderFlowLayout.performLayout (package:kraken/src/rendering/flow.dart:412:5)
flutter: #14     RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
flutter: #15     RenderBoxModel.layout (package:kraken/src/rendering/box_model.dart:793:11)
flutter: #16     RenderFlowLayout._layoutChildren (package:kraken/src/rendering/flow.dart:615:15)
flutter: #17     RenderFlowLayout.performLayout (package:kraken/src/rendering/flow.dart:412:5)
flutter: #18     RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
flutter: #19     RenderBoxModel.layout (package:kraken/src/rendering/box_model.dart:793:11)
flutter: #20     RenderFlowLayout._layoutChildren (package:kraken/src/rendering/flow.dart:615:15)
flutter: #21     RenderFlowLayout.performLayout (package:kraken/src/rendering/flow.dart:412:5)
flutter: #22     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1636:7)
flutter: #23     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:881:18)
flutter: #24     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:462:19)
flutter: #25     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:328:5)
flutter: #26     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
flutter: #27     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
flutter: #28     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
flutter: #32     _invoke (dart:ui/hooks.dart:163:10)
flutter: #33     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
flutter: #34     _drawFrame (dart:ui/hooks.dart:126:31)
flutter: (elided 3 frames from dart:async)
flutter: 
flutter: The following RenderObject was being processed when the exception was fired: RenderFlowLayout#29c84 relayoutBoundary=up4 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE:
flutter:   parentData: isPositioned=false; offset=Offset(0.0, 0.0); runIndex: 0; (can use size)
flutter:   constraints: BoxConstraints(400.0<=w<=Infinity, 20.0<=h<=Infinity)
flutter:   size: MISSING
flutter:   contentSize: null
flutter:   contentConstraints: BoxConstraints(unconstrained)
flutter:   widthSizeType: BoxSizeType.automatic
flutter:   heightSizeType: BoxSizeType.automatic
flutter:   maxScrollableSize: Size(0.0, 0.0)
flutter:   clipX: false
flutter:   clipY: false
flutter:   transformOrigin: Offset(0.0, 0.0)
flutter:   transformAlignment: Alignment.center
flutter: This RenderObject had the following descendants (showing up to depth 5):
flutter:     child 1: RenderTextBox#bab74 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
flutter:       child: KrakenRenderParagraph#79501 NEEDS-LAYOUT NEEDS-PAINT
flutter:         text: TextSpan
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: box does not have laid out.
flutter: Another exception was thrown: box does not have laid out.
flutter: Kraken DevTool listening at ws://127.0.0.1:9222
flutter: Open Chrome/Edge and paste following url to your navigator:
flutter:     devtools://devtools/bundled/inspector.html?ws=127.0.0.1:9222
@cnryb cnryb added the bug Something isn't working label Oct 21, 2021
@cnryb
Copy link
Member Author

cnryb commented Nov 10, 2021

已在 #856 中修复

@cnryb cnryb closed this as completed Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants