Console not showing error - google-chrome-devtools

Google chrome has stopped showing all the JavaScript exceptions
I have tired
To reset under the the dev tool under (setting > restore default and reload)
Reset chrome
Deleted AppData\Local\Google and reinstall Chrome
Not too sure what to do !
Version 65.0.3325.181 (Official Build) (64-bit)
Error is thrown from: Angular.js file

Related

Flutter simply showing 'sysctl -n hw.optional.arm64' returned unexpected output: ''

Not sure which details are relevant so I'll include as many as possible.
Had to upgrade flutter today and instead of working when I typed in 'flutter upgrade' into android studios terminal/Iterm2/terminal zsh I was met with the following response.
'sysctl -n hw.optional.arm64' returned unexpected output: ''
When I search for this issue the only thing i can find is this post which states that sysctl can't be found. The path does appear to be in my .zshrc but still not working. I can't use which or where sysctl as it just says 'sysctl not found'
When I try to upgrade flutter through brew (brew install --cask flutter) it downloads fine but on installing it throws the following error:
==> Purging files for version 3.3.5 of Cask flutter
Error: It seems there is already a Binary at '/opt/homebrew/bin/dart'.
I can't continue working as I need the new flutter version and it seems the web doesn't have much to show for this particular error.
I can't flutter --version, flutter doctor or anything of the sort as I just get the same message.
I'm using:
MacOS monterey 12.6 macbook air.
Android studios
Iterm2
Ohmyzsh
When I open android studios it shows me the following:
"Flutter device daemon #1 exited (exit code 1), stderr: 'sysctl -n hw.optional.arm64' returned unexpected output: '' in a pop up window.
Pubspec has been edited > get dependencies > Upgrade depenedencies: Both of which have the same error as in the title.
The current configured flutter SDK is not known to be fully supported. Please update your SDK and restart intelliJ which I think is what I've been trying to do.
This is an answer I hope will be helpful for others who have the same issue.
Other answers suggested a fix by just updating the path document (.zshrc) but this is what helped me as that did not and my paths were up to date.
Sadly, it's as simple as manually deleting all my flutter SDK files locally. Downloading them again (this time the latest one) and unzipping it into the same place. Didn't even have to update the path).
Worked a charm, issues appear to be all gone except that the dialogue in android studios is still saying that there are dependencies that need getting and upgrading (but doesn't go away even when I've run it).
I solved it by removing the old flutter SDK, downloading the latest version, and setting it up again.
it works perfectly for me!

Failed to start DevTools: Dart DevTools exited with code 255

I am getting this error code in my Visual Studio Code. How can I fix it?
I am using Flutter v2.5.3.
You can try fixing it by running this in the terminal:
Just copy and paste the below code into the terminal and run it.
dart pub global activate devtools -v 2.8.0
which downgrades the version to 2.8.0 (that works fine). I found the answer on GitHub.
I agree with RandomCoder's answer to avoid executing command
dart pub global activate devtools -v 2.8.0
every time before opening Visual Studio Code.
And also if you didn't know the location of the build folder mentioned by RandomCoder, I found the location after reading it here for the pub cache folder:
By default, this directory is located under . pub-cache in your home directory (on macOS and Linux), or in %LOCALAPPDATA%\Pub\Cache (on Windows). (The precise location of the cache may vary depending on the Windows version.)
After you found it, go to the \hosted\pub.dartlang.org\devtools-2.8.0 directory to copy the build version there and paste it in \hosted\pub.dartlang.org\devtools-2.9.2.
I still didn't know if there is any bad effects of copy pasting it to a newer version folder, but in my case it's working until now.
In my case there wasn’t any build folder in the devtools-2.9.2 folder.
I copied it from 2.8.0 and it now works.
For Android Studio
Close Android Studio
Rn dart pub global activate devtools -v 2.8.0 to downgrade (as suggested in a previous answer)
Open Android Studio
Run your build
For Visual Studio Code
Open Terminal
Run dart pub global activate devtools -v 2.8.0 to downgrade (as suggested a previous answer)
I fix this by:
flutter upgrade
This is an issue coming since yesterday. Maybe they must have updated the Dart engine.
There are two ways which will help you to solve the issue.
Update the Flutter SDK to the latest version and restart your PC:
flutter upgrade
Use the Dart Devtools manually
Run flutter pub global in another terminal. Run devtools and then open http://127.0.0.1:9100
Enter a running application field address of your running application in the Connect: "http://127.0.0.1:60230/J7_wS_YhTuo=/"
You can find this URL in debug console when you run the code.
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:51849/mHlycLJYEWw=/ws
If you are getting any issue regarding the port, then do this in your Flutter project console
flutter run --observatory-port=9100
Once the application starts you can see the message in the console.
If you are getting any server issue in the web browser
then enter
dart devtools
In cmd
Downgrade to devtools-2.8.0
And activate using dart pub global activate devtools -v 2.8.0
These two steps worked in my case
First activate your devtool using this command...
flutter pub global activate devtools
flutter pub global run devtools
And after that, try launching it from Visual Studio Code as described in the documentation: Install and run DevTools from VS Code

Why won't my Flutter web app debug open in the browser?

In VScode, I used to be able to go 'Run' -> 'Run without debugging' and if the 'Web server (web-javascript)' was chosen then the Flutter app would open in debug mode in Chrome. This used to open a new Chrome window for the app to be displayed in. I'm not sure what I've done but this no longer works. I now get the message below showing in the debug console. I have tried to go to the localhost link in Chrome but I just get a blank screen and no errors in the Chrome console. I've tried downloading the Dart extension in Chrome but this doesn't help.
Launching lib\main.dart on Web Server in debug mode...
Waiting for connection from Dart debug extension at http://localhost:51367
So far I have tried reinstalling VScode and Flutter, reinstalling the Dart and Flutter extensions. I've even tried to uninstall VScode and remove all the extension and settings files that get left behind (like mentioned here). I've set Flutter up as the Flutter website says every time but none of this has helped and I have no idea what has gone wrong. Could anyone help?
In case it helps, here is the Flutter doctor output:
Downloading android-arm-profile/windows-x64 tools... 1.7s
Downloading android-arm-release/windows-x64 tools... 0.8s
Downloading android-arm64-profile/windows-x64 tools... 1.2s
Downloading android-arm64-release/windows-x64 tools... 1.3s
Downloading android-x64-profile/windows-x64 tools... 2.2s
Downloading android-x64-release/windows-x64 tools... 1.0s
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, 1.20.0-7.3.pre, on Microsoft Windows [Version 10.0.18362.959], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] VS Code (version 1.47.3)
[√] Connected device (2 available)
• No issues found!
The problem for me was in the index.html file located in the "web" folder.
The cause for the error was my <script src="main.dart.js" type="application/javascript"></script> line. It was not at the very bottom of the body tag. Moving it to the bottom fixed the issue.
You might also need to re-check the index.html file in general. The general order inside the body tag should be as follows:
1-
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('flutter-first-frame', function () {
navigator.serviceWorker.register('flutter_service_worker.js');
});
}
</script>
2- (applies to firebase users) Firebase CDN scripts. ex:
<script src="https://www.gstatic.com/firebasejs/7.20.0/firebase-app.js"></script>
3- (Firebase users)
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "<your api key>",
authDomain: "<your auth domain>",
projectId: "<Your project id>",
messagingSenderId: "<your messaging sender id>",
appId: "<your app id>"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
</script>
4- (most importantly) Make sure this line is at the bottom of the body tag
<script src="main.dart.js" type="application/javascript"></script>
I had to rerun flutter config --enable-web after an upgrade to get it working again. Then restart vscode and run.
For me. All I had to do was to make sure that Chrome was the default browser.
if you want to run your flutter web code in a specific port or..., you will see this error.
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Please click the Dart Debug extension button in the spawned browser window
you can easily install dart extension from dart-extention and click on it every time you run your code.
Last resort (maybe someone has a better solution). Make a new project and copy the lib across. Add anything needed in the pubspec.yaml
Simply open a new tab with the flutter app URL.
For me, I used an old project that has Android build files. I did the following
flutter config --enable-web
flutter clean
restarting vscode
It solved the problem.
I solved it after upgrading flutter to 3.0v.
flutter upgrade
Just in case anyone has facing this issue in vscode devcontainer, I had a hard time trying to figure out what was happening, I tried everything, flutter clean, forwarding port in devcontainer. It just happened that the version of flutter that i was using had the issue. I was using 3.6 and change to 3.9, everything is working right now.
I was getting a white blank screen and debug console said this
Running "flutter pub get" in flutter_application_1...
Launching lib/main.dart on Web Server in debug mode...
lib/main.dart:1
Waiting for connection from Dart debug extension at http://localhost:42207
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Please click the Dart Debug extension button in the spawned browser window
flutter run -d web-server in cmd line worked for me though I have to press 'r' manually to reload
If running on the web check the web console. I had a js function that double declared "index".

Issue with Flutter commands after Flutter upgrade

My project was working okay before I got Flutter upgrade prompt. After accepting to upgrade flutter, I started getting the following exception and now with every flutter command I get this exception. Also since that problem started Android Studio does not pick up any running emulator. So basically, I'm stuck, please help. It just displays "Loading..." instead of displaying the running Emulator.
Version Information:
Android Studio 3.4.2 • Flutter plugin io.flutter 38.2.1 • Dart plugin 183.6270
I've change the permission for git.EXE to allow for read, execute etc but this has not helped.
ERROR MESSAGE:
CreateProcessW failed 5
Unhandled exception:
ProcessException: Access is denied.
I have faced the same issue after running the flutter upgrade command
Remove exiting flutter SDK from the directory "https://flutter.dev/docs/get-started/install" and download again and run the following command
flutter doctor -v
After running the flutter upgrade command in the Windows CMD I faced the same issue.
I then tried to upgrade Flutter SDK using the Android Studio terminal and it upgraded successfully.

Protractor/webdriver-manager error: "Cannot get automation extension"

I am running protractor tests, and within the last couple days started getting this error:
WebDriverError: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
After some research, I tried updating protractor but I was already on the latest version (5.1.1). I checked to see if my chromedriver and chrome version are compatible and it looks like they are. I also updated my webdriver-manage to 12.0.4 but I still have the same problem.
-My chrome version is: 57.0.2987.133 (Official Build) (64-bit)
-protractor is: 5.1.1
-webdriver-manager is: 12.0.4
-chromedriver version: 2.2.6
https://github.com/SeleniumHQ/selenium/issues/3508
According to the comment from "JimmyKane" installing chromedriver v2.28 and removing the browser.manage().window().setSize() fixed it.