The following ProviderNotFoundException was thrown building Consumer<ThemeProvider>(dirty) - flutter

Error: Could not find the correct Provider above this Consumer Widget
EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK
The following TestFailure object was thrown running a test:
Expected: exactly one matching node in the widget tree
Actual: _TextFinder:<zero widgets with text "0" (ignoring offstage widgets)>
Which: means none were found but one was expected
When the exception was thrown, this was the stack:
#4 main.<anonymous closure> (file:///C:/flutter/MyProject/dumpit/test/widget_test.dart:19:5)
(elided one frame from package:stack_trace)
This was caught by the test expectation on the following line:
file:///C:/flutter/MyProject/dumpit/test/widget_test.dart line 19
The test description was:
Counter increments smoke test

There was default test case file present in test folder which was against my app model and hence threw an error. I got rid of it to solve my test run

Related

Pumpandsettle() time out when using --test-randomize-ordering-seed flag but passes without the flag

When adding the flag --test-randomize-ordering-seed on running the flutter test pumpandsettle timeout occurs but without the flag, all test cases pass.
The following error was thrown:
The following assertion was thrown running a test:
pumpAndSettle timed out
When the exception was thrown, this was the stack:
#0 WidgetTester.pumpAndSettle.<anonymous closure> (package:flutter_test/src/widget_tester.dart:673:11)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

Flutter: How to preserve the file created through getApplicationDocumentsDirectory() on an iPhone?

I made an app for which I store images in a file (using getApplicationDocumentsDirectory()), everything works fine, except on the physical iPhone where I cannot access the data again if I quit the running app.
when I try to reopen the app I get this message error :
Reload already in progress, ignoring request
Restarted application in 1,654ms.
════════ Exception caught by image resource service ════════════════════════════
The following FileSystemException was thrown resolving an image codec:
Cannot open file, path = '/var/mobile/Containers/Data/Application/63108BB4-7170-44CF-8DF6-43885B77C05B/Documents/4TSqff2TFeUnxwQUJXymrZw23ir2.jpg' (OS Error: No such file or directory, errno = 2)
When the exception was thrown, this was the stack
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:356:9)
<asynchronous suspension>
#1 FileImage._loadAsync
<asynchronous suspension>
Path: /var/mobile/Containers/Data/Application/63108BB4-7170-44CF-8DF6-43885B77C05B/Documents/ImageName1.jpg
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by image resource service ════════════════════════════
Cannot open file, path = '/var/mobile/Containers/Data/Application/63108BB4-7170-44CF-8DF6-43885B77C05B/Documents/WgZMKUy95lOSV9jnlQOE6hbCStS2.jpg' (OS Error: No such file or directory, errno = 2)
════════════════════════════════════════════════════════════════════════════════
In android studio, I don't have this problem!

Android studio flutter logs stacktrace doesn't show correct line number

Android studio for flutter doesn't show correct line number in console.
For e.g.
The following ArgumentError was thrown resolving an image codec:
Invalid argument(s): No host specified in URI file:///
When the exception was thrown, this was the stack:
#0 _HttpClient._openUrl (dart:_http/http_impl.dart:2667:9)
#1 _HttpClient.getUrl (dart:_http/http_impl.dart:2575:48)
#2 NetworkImage._loadAsync (package:flutter/src/painting/_network_image_io.dart:87:59)
#3 NetworkImage.load (package:flutter/src/painting/_network_image_io.dart:50:14)
And now have NetworkImage widget all over the code. How to figure out which line is causing this ?

Exception caught by image resource service The following assertion was thrown resolving an image codec:

════════ Exception caught by image resource service ════════════════════════════
The following assertion was thrown resolving an image codec:
Unable to load asset: /data/user/0/com.Freedom.new_chat/cache/file_picker/-vimzzn.jpg
When the exception was thrown, this was the stack
#0 PlatformAssetBundle.load
package:flutter/…/services/asset_bundle.dart:228
<asynchronous suspension>
#1 AssetBundleImageProvider._loadAsync
package:flutter/…/painting/image_provider.dart:675
<asynchronous suspension>
Anyone can help me i can provide the codes
i would provide them now but i dont know which one have the error and thanks
now i get this one too
Image provider: AssetImage(bundle: null, name: "/data/user/0/com.Freedom.new_chat/cache/file_picker/Snapchat-1984491257.jpg")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#534c4(), name: "/data/user/0/com.Freedom.new_chat/cache/file_picker/Snapchat-1984491257.jpg", scale: 1.0)
close your emulator and run this command
flutter clean
then run this command
flutter pub get
Run Your App

Windows(dev) to Linux(prod) Zend Framework migration errors

I'm getting the following error migrating my code across from my Windows dev machine to my linxu production machine. I'm aware there are always separator and case sensitivity issues (which I have fixed), however this one seems to be coming from the Framework itself.
My controllers are all following the convention (Uppercase first camel).
I'm using the bootstrap provided by Zend_App and this is all working (well with no errors) on my dev box.
Its parsing Plugins, however can't seem to get to controllers.
Any ideas would be great. :-)
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in /****mywebroot***/library/Zend/Controller/Dispatcher/Standard.php:242 Stack trace: #0 //****mywebroot***/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /****mywebroot***/library/Zend/Application/Bootstrap/Bootstrap.php(77): Zend_Controller_Front->dispatch() #2 /****mywebroot***/public/index.php(26): Zend_Application->run() #4 {main} thrown in /****mywebroot***/library/Zend/Controller/Dispatcher/Standard.php on line 242
I'm hoping this is a basic error
Triple check the case the name of files and directories your controllers are in.
This specific exception could also be caused by not having a default controller available.