Flutter Throws NEEDS-PAINT on Everything? - dart

everyone.
I'm currently in a time crunch to try and build an app in Flutter, and I've run into a slight problem. My app, after I implemented some code written by a colleague, is throwing a NEEDS-PAINT exception when I reach the TeamState state.
Here's a link to a Git repo that contains all our code in Main.dart.
Any and all help is greatly appreciated.
EDIT: Full error...
I/flutter (14688): Another exception was thrown: RenderBox was not laid out: RenderPointerListener#e1773 relayoutBoundary=up7 NEEDS-PAINT

Could be https://github.com/flutter/flutter/issues/27356
which happens when the text passed to Text(...) is empty.
Changing such code to
text?.isEmpty ?? false ? Container() : Text(text)
should fix it.

Related

flutter navigator 2.0 on ios

i'm creating a Flutter native App implementing navigator 2.0
everything works fine in android simulators, even built and deployed to internal tests in play store.
now i started trying on IOS ( didn't have access to ios emulator before )
after many struggles i get the app working ... but i still have an issue
on navigation delegate
i have a pagelist on which i append various screens depending of the state.
everything works fine for 3 different screens.(the 3 most complicated)
and i always have at most 2 screens built
but when i add the last one, which is an onboarding screen for the first launch of the app with liquid swipe i have the following error when i touch the screen.
════════ Exception caught by gesture library ═══════════════════════════════════
The following assertion was thrown while routing a pointer event:
RenderBox was not laid out: RenderUiKitView#a395b NEEDS-LAYOUT NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
package:flutter/…/rendering/box.dart:1
Failed assertion: line 2001 pos 12: 'hasSize'
════════ Exception caught by services library ══════════════════════════════════
A KeyUpEvent is dispatched, but the state shows that the physical key is not pressed. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in `HardwareKeyboard`. This was the event: KeyUpEvent#2b4f8(physicalKey: PhysicalKeyboardKey#700e3(usbHidUsage: "0x000700e3", debugName: "Meta Left"), logicalKey: LogicalKeyboardKey#00106(keyId: "0x200000106", keyLabel: "Meta Left", debugName: "Meta Left"), character: null, timeStamp: 283:31:49.450445)
'package:flutter/src/services/hardware_keyboard.dart':
package:flutter/…/services/hardware_keyboard.dart:1
Failed assertion: line 432 pos 16: '_pressedKeys.containsKey(event.physicalKey)'
for debuging, i removed the onboardingscreen and added a simple
if (_searchScreen) {
pageList.add(CupertinoPage(
child: SearchScreen(
searchViewModel: SearchViewModel(_apiInstance, DbInstance(), this,
words: _words),
)));
}
if (_displayOnboarding) {
pageList.add(MaterialPage(
child: Scaffold(
appBar: AppBar(),
body: Container(child: Text('test')),
)));
}
it builds and renders screen but when i touch the screen i get the same errors as before
do you have any idea of what's the issue??
thank you!

ERROR after update: ... exception 'NSGenericException', reason: 'This coder requires that replaced objects be returned from initWithCoder:'

I was updated xcode today.
When I want to show some viewController (without collectionView & tableView), I’ve got crash in AppDelegate and debug info:
Terminating app due to uncaught exception 'NSGenericException', reason: 'This coder requires that replaced objects be returned from initWithCoder:’
Anyone solved this problem?
Check your ViewController for injected Object references. It may be caused by external class from some Pod Repository. Remove it and define all the logic inside the VC class. This solved the issue for me. VC Scene

AKMicrophone causes SIGABRT error - A bug?

I found a post that has the same error in the same situation here:
https://groups.google.com/forum/#!topic/audiokit/SmyuzPJQ6wU
Same as this poster - I'm using the source. However, at the end of the post the user does not say what he did to fix the issue.
I'm currently using an unaltered "ExtendingAudioKitUsingSource" example as I need to add some functionality to audiokit. (unaltered outside of using my provisioning profile and adding "let m = AKMicrophone()" in ViewController.swift.
I receive these errors:
2018-08-31 15:16:50.684 ExtendingAudioKit[6800:8850964] 15:16:50.683
ERROR: [0x39058000] AVAudioIONodeImpl.mm:452:
___ZN13AVAudioIOUnit9EnableBusEm_block_invoke: error -10849
2018-08-31 15:16:50.688 ExtendingAudioKit[6800:8850964] ***
Terminating app due to uncaught exception
'com.apple.coreaudio.avfaudio', reason: 'error -10849'
which traces back to line 46 in AKMicrophone.swift to init(): AudioKit.engine.connect(AudioKit.engine.inputNode, to: self.avAudioNode, format: nil)
I've had no issues using AKMicrphone() outside of this project.
I have fixed an AKMicrophone bug in AudioKit v4.5.1 that may have fixed this for you. If not, I'll withdraw this answer, but please check it out and let me know.

Azure KeyVault: Exceptions when using GetSecretAsync

In development mode, on my local machine VS2017 15.7.5, I'm using
Asp.Net MVC Core 2.1
Azure KeyVault 3.0.0
AppAuthentication 1.1.0-preview
I've built a separate project used to get secrets from the vault, adding logging and other stuff. I reference that project from my MVC project.
When I launch the site I get:
Exception thrown: 'System.IO.FileLoadException' in Microsoft.AspNetCore.Hosting.dll
Which I can't track down.
{EDIT: I found this, it as a bad reference in the CSPROJ. Everything else remains the same.}
I instantiate a AzureServiceTokenProvider like this:
_provider = new AzureServiceTokenProvider();
_client = new KeyVaultClient(new KeyVaultClient
.AuthenticationCallback(_provider.KeyVaultTokenCallback));
and then I use it like this:
try
{
var secretBundle = await _client
.GetSecretAsync(_config[$"{SecretUrlsKey}:{secretName}"])
.ConfigureAwait(false);
Debug.WriteLine("Secret retrieved from vault ...");
_secretCache.Add(secretName, secretBundle.Value);
return secretBundle?.Value;
}
catch (Exception e)
...
I then I get a flurry of errors (none of which are returned to my code). Like these:
Exception thrown: 'Microsoft.Rest.TransientFaultHandling.HttpRequestWithStatusException' in Microsoft.Rest.ClientRuntime.dll
Exception thrown: 'Microsoft.Rest.TransientFaultHandling.HttpRequestWithStatusException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Net.Http.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Net.Http.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Net.Http.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProviderException' in Microsoft.Azure.Services.AppAuthentication.dll
Exception thrown: 'Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProviderException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProviderException' in System.Private.CoreLib.dll
Eventually I get the value I'm looking for, but this seems a little wonky.
FWIW, I have had zero success deploying it to Azure.
Anyone have any ideas about any of this?
TIA
As for the second problem, it happened to me on two different machines. With no real scientific analysis (no time for that) my hunch is that the dotnet core update that allows you to run VS while it installs is causing the problem.
In the end, I used the Visual Studio Installer repair option and the problem went away. Something must have been corrupted.
Don't forget to backup your extensions and settings, cause the repair will nuke all that.
Nuget package clearing and reinstalling did nothing.

Unknown Null pointer exception at line ( -1 )

I have the following null pointer exception, I am unable to debug that due to insufficient stack trace, the exception I am getting as following,
Exception stack trace :
org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException#3855a1c
className=Unknown lineNumber=-1
stackTrace=java.lang.NullPointerException codeSnippet=[] gspFile=null
cause=java.lang.NullPointerException
resolver=org.springframework.core.io.support.PathMatchingResourcePatternResolver#27dee612
stackTraceLines=[java.lang.NullPointerException ] fileName=null
detailMessage=null cause=java.lang.NullPointerException stackTrace=[]
suppressedExceptions=[]
My application is working fine, but I'm continuously receiving this exception in email, I am not able to debug this issue, any help is appreciated!

Resources