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

RangeError: RangeError (index): Invalid value: Only valid value is 0: 1 #17831

Closed
walkerwzy opened this issue May 23, 2018 · 26 comments
Closed
Assignees

Comments

@walkerwzy
Copy link

walkerwzy commented May 23, 2018

a very simple start-up app, and runs good, but suddenly crash, then can never run again:

Source (main.dart):

import 'dart:math';

import 'package:flutter/material.dart';

void main() {
  runApp(new MaterialApp(home: new ChartPage()));
}

class ChartPage extends StatefulWidget {
  @override
  ChartPageState createState() => new ChartPageState();
}

class ChartPageState extends State<ChartPage> {
  final random = new Random();
  int dataSet;
  
  void changeData() {
    setState(() {
      dataSet = random.nextInt(100);
    });
  }
  
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      body: new Center(
        child: new Text('Data set: $dataSet'),
      ),
      floatingActionButton: new FloatingActionButton(
        child: new Icon(Icons.refresh),
        onPressed: changeData,
      ),
    );
  }
}

Logs

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter run -d D98B467B-1756-436B-9DAF-98E915394BA3

exception

RangeError: RangeError (index): Invalid value: Only valid value is 0: 1

#0      List.[] (dart:core-patch/dart:core/growable_array.dart:141)
#1      readDepfile (package:flutter_tools/src/base/fingerprint.dart:174)
<asynchronous suspension>
#2      Fingerprinter._getPaths (package:flutter_tools/src/base/fingerprint.dart:88)
<asynchronous suspension>
#3      Fingerprinter.doesFingerprintMatch (package:flutter_tools/src/base/fingerprint.dart:60)
<asynchronous suspension>
#4      KernelCompiler.compile (package:flutter_tools/src/compile.dart:104)
<asynchronous suspension>
#5      build (package:flutter_tools/src/bundle.dart:74)
<asynchronous suspension>
#6      IOSSimulator._sideloadUpdatedAssetsForInstalledApplicationBundle (package:flutter_tools/src/ios/simulators.dart:388)
#7      IOSSimulator._setupUpdatedApplicationBundle (package:flutter_tools/src/ios/simulators.dart:354)
<asynchronous suspension>
#8      IOSSimulator.startApp (package:flutter_tools/src/ios/simulators.dart:286)
<asynchronous suspension>
#9      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:289)
<asynchronous suspension>
#10     HotRunner.run (package:flutter_tools/src/run_hot.dart:216)
<asynchronous suspension>
#11     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:399)
<asynchronous suspension>
#12     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:344)
<asynchronous suspension>
#13     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:279)
<asynchronous suspension>
#14     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#15     _rootRun (dart:async/zone.dart:1126)
#16     _CustomZone.run (dart:async/zone.dart:1023)
#17     runZoned (dart:async/zone.dart:1501)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#19     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:270)
#20     CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#21     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:309)
<asynchronous suspension>
#22     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#23     _rootRun (dart:async/zone.dart:1126)
#24     _CustomZone.run (dart:async/zone.dart:1023)
#25     runZoned (dart:async/zone.dart:1501)
#26     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:265)
<asynchronous suspension>
#28     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#29     new Future.sync (dart:async/future.dart:222)
#30     CommandRunner.run (package:args/command_runner.dart:109)
#31     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:174)
#32     run.<anonymous closure> (package:flutter_tools/runner.dart:54)
<asynchronous suspension>
#33     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#34     _rootRun (dart:async/zone.dart:1126)
#35     _CustomZone.run (dart:async/zone.dart:1023)
#36     runZoned (dart:async/zone.dart:1501)
#37     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#38     runInContext (package:flutter_tools/src/context_runner.dart:43)
<asynchronous suspension>
#39     run (package:flutter_tools/runner.dart:49)
#40     main (package:flutter_tools/executable.dart:49)
<asynchronous suspension>
#41     main (file:///b/build/slave/Mac_Flutter_Packaging/build/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#42     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#43     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

flutter doctor

[✓] Flutter (Channel dev, v0.4.4, on Mac OS X 10.13.4 17E202, locale en-CN)
    • Flutter version 0.4.4 at /Users/walker/Documents/libs/flutter
    • Framework revision f9bb4289e9 (11 days ago), 2018-05-11 21:44:54 -0700
    • Engine revision 06afdfe54e
    • Dart version 2.0.0-dev.54.0.flutter-46ab040e58

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/walker/Documents/libs/android-sdk-macosx
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /Users/walker/Documents/libs/android-sdk-macosx
    • Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.3, Build version 9E145
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.2

[✗] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).

[✓] VS Code (version 1.23.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.12.1

[✓] Connected devices (2 available)
    •          • b6fac6f62dbfba496a084ce56ddc80d94121385b • ios • iOS 
    • iPhone X • D98B467B-1756-436B-9DAF-98E915394BA3     • ios • iOS 11.3 (simulator)

! Doctor found issues in 1 category.

flutter analyze

flutter analyze
Analyzing animation...
No issues found! (ran in 1.8s)
@bpavlich
Copy link

Ditto ... same problem as of 5/23/2018.

@ScholliYT
Copy link

same problem here

@bpavlich
Copy link

bpavlich commented May 24, 2018

I am using Android Studio and creating a flutter app for my build. I just created a new app, copied my main.dart project file and modified my pubspec.yaml file. I also needed to rerun:

c:\myapp>flutter packages get
Running "flutter packages get" ...

Perhaps trying to rerun "flutter packages get" first in the failing project would be a good attempt to fix the range error.

I am new to flutter so please excuse my brute force method to fixing the issue.

@bdytx5
Copy link

bdytx5 commented May 24, 2018

Hey guys, I was able to fix it by going to the projects root directory and running the command

flutter clean

... I was experiencing the issue on iOS.

@Yusuf-G-Ali
Copy link

I had the same issue and "flutter clean" did it for me too

@sarangkartikey50
Copy link

flutter clean is working!

@evanave
Copy link

evanave commented May 29, 2018

flutter clean did the trick! Thanks bdytx5!

@FedeGens
Copy link

FedeGens commented Jun 3, 2018

flutter clean is the way!

@stychu
Copy link

stychu commented Jun 3, 2018

flutter clean worked also for me !. It's so weird... I was just developing some tutorial app and in a second I got the error and app couldn't run at all after that... anyway not working thanks !

@salmansamie
Copy link

Jessus, this error showed in both iOS and Android flutter clean worked like charm.

@DanTup
Copy link
Contributor

DanTup commented Jun 6, 2018

I'm seeing this too. The failing code is this (in base/fingerprint.dart readDepfile):

  final String contents = await fs.file(depfilePath).readAsString();
  final String dependencies = contents.split(': ')[1];

The file it's reading is build/snapshot_blob.bin.d which is a zero-byte file. @cbracken do you think this code should handle empty files, or is there a bug elsewhere that we've ended up with them?

@mojason-81
Copy link

I ran into this same problem tonight. +1 for running flutter clean

@cbracken
Copy link
Member

cbracken commented Jun 8, 2018

The file it's reading is build/snapshot_blob.bin.d which is a zero-byte file. @cbracken do you think this code should handle empty files, or is there a bug elsewhere that we've ended up with them?

It does seem very suspicious that the kernel compiler has emitted a zero-byte depfile (assuming that's what's going on here). I'll land a fix in the fingerprinter; errors there should never be fatal -- at worst they should result in the build being invalidated. Gradle also attempts to parse this file so I suspect we'll need a fix there too.

@a-siva @mraleph is the kernel compiler ever expected to emit a 0-byte file?

EDIT: actually after poking through this code for unrelated reasons today, @sbaranov and I ran across a bug in how gen_snapshot.d is emitted. I suspect that's the more likely culprit here. Fix in #18322.

@cbracken
Copy link
Member

cbracken commented Jun 9, 2018

The fix is out in #18321.

UPDATE: it's landed on master.

@cbracken cbracken closed this as completed Jun 9, 2018
@zirinisp
Copy link

flutter clean fixed it for me

@MishraUdit
Copy link

Hey @bdytx5, I have tried the flutter clean command but it was not helpful in my case. Here is the output of flutter run after the flutter clean:

F:\AndroidStudio\AndroidStudioProjects\grade_upgrade>flutter run
Launching lib/main.dart on iris X1 in debug mode...
Initializing gradle...                                       2.3s
Resolving dependencies...                                    4.3s
Running 'gradlew assembleDebug'...
e: java.rmi.NoSuchObjectException: no such object in table
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
        at com.sun.proxy.$Proxy96.clearJarCache(Unknown Source)
        at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compileWithDaemon(GradleKotlinCompilerRunner.kt:216)
        at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compileWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:156)
        at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compileWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:52)
        at org.jetbrains.kotlin.compilerRunner.KotlinCompilerRunner.runCompiler(KotlinCompilerRunner.kt:127)
        at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJvmCompiler(GradleKotlinCompilerRunner.kt:107)
        at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$kotlin_gradle_plugin(Tasks.kt:326)
        at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$kotlin_gradle_plugin(Tasks.kt:231)
        at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:745)

e: Compiler terminated with internal error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Internal compiler error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 50s
Gradle build failed: 1

F:\AndroidStudio\AndroidStudioProjects\grade_upgrade>

@1Rico
Copy link

1Rico commented Aug 10, 2018

flutter clean really did it for me too.

@abhinavsingh
Copy link

  1. flutter clean
  2. Run but build fails
  3. Run again, build succeeds

@aakritikishore
Copy link

flutter clean didn't work for me.

@AnandGupta7866
Copy link

AnandGupta7866 commented Jan 11, 2019

I/flutter (25300): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (25300): The following RangeError was thrown building NextDetailPage(dirty, state:
I/flutter (25300): _NextDetailPageState#6e135):
I/flutter (25300): RangeError (index): Invalid value: Valid value range is empty: 0
I/flutter (25300): When the exception was thrown, this was the stack:
I/flutter (25300): #0      List.[] (dart:core/runtime/libgrowable_array.dart:145:60)
I/flutter (25300): #1      _NextDetailPageState.build (package:mathsen/pages/NextDetailPage.dart:356:29)
I/flutter (25300): #2      StatefulElement.build (package:flutter/src/widgets/framework.dart:3809:27)
I/flutter (25300): #3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3721:15)
I/flutter (25300): #4      Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #5      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #6      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
I/flutter (25300): #7      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #8      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #9      Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #10     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #11     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #12     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #14     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #15     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #16     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #17     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #19     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #20     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #21     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #22     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #23     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #24     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #25     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #26     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #27     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #28     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #32     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #33     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #34     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
I/flutter (25300): #35     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #36     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #37     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #38     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #39     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #40     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #41     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #42     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #43     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #44     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #45     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #46     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #47     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
I/flutter (25300): #48     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #49     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #50     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #51     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #52     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #53     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #54     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #55     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #56     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #57     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #58     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #59     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #60     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #61     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #62     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #63     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #64     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #65     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #66     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
I/flutter (25300): #67     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #68     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #69     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #70     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #71     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #72     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #73     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #74     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #75     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #76     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
I/flutter (25300): #77     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #78     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #79     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #80     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #81     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #82     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #83     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #84     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #85     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #86     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #87     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #88     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
I/flutter (25300): #89     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #90     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #91     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #92     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #93     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #94     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (25300): #95     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
I/flutter (25300): #96     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (25300): #97     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (25300): #98     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (25300): #99     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4643:32)
I/flutter (25300): #100    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4975:17)
I/flutter (25300): #101    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #102    _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
I/flutter (25300): #103    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #104    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #105    Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #106    StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)
I/flutter (25300): #107    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #108    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #109    Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #110    ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)
I/flutter (25300): #111    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #112    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)
I/flutter (25300): #113    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #114    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #115    Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #116    StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)
I/flutter (25300): #117    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #118    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)
I/flutter (25300): #119    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #120    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)
I/flutter (25300): #121    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)
I/flutter (25300): #122    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
I/flutter (25300): #123    Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (25300): #124    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2286:33)
I/flutter (25300): #125    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:676:20)
I/flutter (25300): #126    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
I/flutter (25300): #127    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (25300): #128    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter (25300): #129    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter (25300): #130    _invoke (dart:ui/hooks.dart:154:13)
I/flutter (25300): #131    _drawFrame (dart:ui/hooks.dart:143:3)
I/flutter (25300): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (25300): Another exception was thrown: RangeError (index): Invalid value: Valid value range is empty: 0

@AnandGupta7866
Copy link

flutter clean not work for me too

@zoechi
Copy link
Contributor

zoechi commented Jan 11, 2019

@AnandGupta7866
Please consider asking support questions in one of the other channels listed at http://flutter.io/support .

@michalsuryntequiqo
Copy link

Hi guys! I also has the same problem, flutter clean did not help.
Take care if you didn't left any unfinished line like this - import 'package:; in your code.
Android Studio did not complain about this and it appeared that removing this line helped solving the issue.

@DanTup
Copy link
Contributor

DanTup commented Jan 21, 2019

Take care if you didn't left any unfinished line like this - import 'package:; in your code.
Android Studio did not complain about this and it appeared that removing this line helped solving the issue.

If you can make a small repro for this, please file a bug. I tried but I got three errors!

screenshot 2019-01-21 at 2 32 23 pm

@talhashahab786

This comment has been minimized.

@khaliqdadmohmand

This comment has been minimized.

@flutter flutter locked as resolved and limited conversation to collaborators Apr 30, 2020
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