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

Range Error (Offset) when building release with latest Beta version #148565

Closed
Aljxndr opened this issue May 17, 2024 · 2 comments
Closed

Range Error (Offset) when building release with latest Beta version #148565

Aljxndr opened this issue May 17, 2024 · 2 comments

Comments

@Aljxndr
Copy link

Aljxndr commented May 17, 2024

Steps to reproduce

  1. I run flutter run and see that my app runs fine on debug mode
  2. I run flutter build apk, or try to run in release mode, and see the following error:
    RangeError (offset): Invalid value: Not in inclusive range 0..2374: 2496
  3. I look up a solution, find this issue, and changed my channel to the beta channel with flutter channel beta.
  4. I ran flutter clean, flutter upgrade, tried again, and still the same issue

Expected results

I expect to be able to generate the app bundle for uploading to google play.

Actual results

I get the error RangeError (offset): Invalid value: Not in inclusive range 0..2374: 2496 when trying to build my app in release mode with any command.

Logs

Logs
RangeError (offset): Invalid value: Not in inclusive range 0..2374: 2496
#0      RangeError.checkValueInInterval (dart:core/errors.dart:313)
#1      Source.getLocation (package:kernel/ast.dart:14992)
#2      Component.getLocation (package:kernel/ast.dart:14787)
#3      _getLocationInComponent (package:kernel/ast.dart:15181)
#4      Procedure._getLocationInEnclosingFile (package:kernel/ast.dart:3329)
#5      TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207)
#6      TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207)
#7      TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207)
#8      TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207)
#9      TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207)
#10     TreeNode.location (package:kernel/ast.dart:203)
#11     localFunctionName (package:vm/transformations/type_flow/utils.dart:449)
#12     SummaryCollector.createSummary (package:vm/transformations/type_flow/summary_collector.dart:630)
#13     TypeFlowAnalysis.getSummary (package:vm/transformations/type_flow/analysis.dart:1782)
#14     _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:398)
#15     _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:287)
#16     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1663)
#17     _WorkList.process (package:vm/transformations/type_flow/analysis.dart:1606)
#18     TypeFlowAnalysis.process (package:vm/transformations/type_flow/analysis.dart:1811)
#19     transformComponent (package:vm/transformations/type_flow/transformer.dart:121)
#20     runGlobalTransformations (package:vm/kernel_front_end.dart:589)
#21     compileToKernel (package:vm/kernel_front_end.dart:489)
<asynchronous suspension>
#22     FrontendCompiler.compile (package:frontend_server/frontend_server.dart:639)
<asynchronous suspension>
#23     starter (package:frontend_server/starter.dart:101)
<asynchronous suspension>
#24     main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13)
<asynchronous suspension>

Flutter Doctor output

Doctor output
[√] Flutter (Channel beta, 3.22.0-0.3.pre, on Microsoft Windows [Versi¢n 10.0.19045.4291], locale es-CO)
    • Flutter version 3.22.0-0.3.pre on channel beta at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 87b652410d (3 weeks ago), 2024-04-23 21:41:18 -0500
    • Engine revision b4bfd45986
    • Dart version 3.4.0 (build 3.4.0-282.3.beta)
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Alejandro\AppData\Local\Android\sdk
    • Platform android-34-ext8, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.9.34714.143
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\Alejandro\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[√] Connected device (4 available)
    • SM A226BR (mobile) • R9WW201HDLA • android-arm64  • Android 13 (API 33)
    • Windows (desktop)  • windows     • windows-x64    • Microsoft Windows [Versi¢n 10.0.19045.4291]
    • Chrome (web)       • chrome      • web-javascript • Google Chrome 124.0.6367.202
    • Edge (web)         • edge        • web-javascript • Microsoft Edge 124.0.2478.105

[√] Network resources
    • All expected network resources are available.

• No issues found!
@Aljxndr
Copy link
Author

Aljxndr commented May 18, 2024

I solved the issue by switching to the master channel, not the beta. Version 3.22.0-36.0.pre.48

Copy link

github-actions bot commented Jun 1, 2024

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 bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant