Observatory server failed to start after 1 tries

#!/usr/bin/env bash
pub global run coverage:collect_coverage --port=8111 --out=coverage/coverage.json --resume-isolates --wait-paused &
dart --observe=8111 test/all.dart
pub global run coverage:format_coverage --packages=.packages --in=coverage/coverage.json --lcov --report-on=lib --out=coverage/lcov.info

With Dart 1.24.2, 1.25.0-dev.16.4 and
Dart VM version: 2.0.0-dev.8.0 (Fri Nov 17 13:56:30 2017) on "macos_x64"

 (add_tests) $ tool/codecov.sh 
Observatory server failed to start after 1 tries
00:00 +0:  onInitializedChange should emit true when initialized
00:00 +1:  onInitializationCompleted should complete when initialized
00:00 +2:   change theme should update state and emit onThemeChange
00:00 +3:   change active screen should update state
00:00 +4:   change active tab should update state
00:00 +5:   changing active screen should clear active tab
00:00 +6:   invoking changeActiveScreen action with the name of the current screen, should not clear active tab
00:00 +7:   changing database should update state
00:00 +8:   onStateChange should emit an event when state changes
00:00 +9:   getUserProfile should cause the user profile to get loaded
00:00 +10:  actions.group.groupsChanged action should change group
00:00 +11:  actions.group.groupsChanged with group of owner should auto-select the group
00:00 +12:  GroupMessageComposeController initial state should be defined
00:00 +13:  GroupMessageComposeController createNewMessage action should update state
00:00 +14:  GroupMessageComposeController loaded message should update messages and messageEvent
00:00 +15:  GroupMessageListController timeago should format seconds ago
00:00 +16:  GroupMessageController (2) should create controllers for subsequently added messages
00:00 +17: JSON (de)serialization serialize - deserialize should result in the original value
00:00 +18: JSON (de)serialization deserialization should handle string dates correctly
00:00 +19: JSON (de)serialization deserialization should handle Uri correctly
00:00 +20: JSON (de)serialization serialize and deserialize should succeed for BabyProfile
00:00 +21: JSON (de)serialization serialize and deserialize should succeed for Group
00:00 +22: JSON (de)serialization serialize and deserialize should succeed for GroupBookEntry
00:00 +23: app reducer wasInitialized
00:00 +24: app reducer databaseChanged
00:00 +25: app reducer popupMessageAdded
00:00 +26: app reducer popupMessageCleared
00:00 +27: app reducer popupMessageRemoved
00:00 +28: app reducer themeChanged
00:00 +29: app reducer userProfileChanged
00:00 +30: app reducer ticked
00:00 +31: authentication reducer authenticatedUserChanged
00:00 +32: authentication reducer loggedInWithGoogle
00:00 +33: authentication reducer loggedOut
00:00 +34: database simple request should succeed
00:00 +35: database request should fail
00:00 +36:  should generate log record
00:00 +37:  log record should not print security sensitive information
00:00 +38: All tests passed!
vm-service: isolate(737052896)  'all.dart:main()' has no debugger attached and is paused at exit.  Connect to Observatory to debug.
Observatory server failed to start after 2 tries
Observatory server failed to start after 3 tries
Observatory server failed to start after 4 tries
Observatory server failed to start after 5 tries
Observatory server failed to start after 6 tries
Observatory server failed to start after 7 tries
Observatory server failed to start after 8 tries
Observatory server failed to start after 9 tries
Observatory server failed to start after 10 tries
Observatory server failed to start after 11 tries
Could not start Observatory HTTP server:
SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = localhost, port = 8111
#0      _NativeSocket.bind (dart:io-patch/socket_patch.dart:542)
<asynchronous suspension>
#1      _RawServerSocket.bind (dart:io-patch/socket_patch.dart:1124)
#2      _ServerSocket.bind (dart:io-patch/socket_patch.dart:1371)
#3      ServerSocket.bind (dart:io-patch/socket_patch.dart:1361)
#4      _HttpServer.bind (dart:_http/http_impl.dart:2500)
#5      HttpServer.bind (dart:_http:276)
#6      Server.startup.poll (server.dart:348:36)
<asynchronous suspension>
#7      Server.startup (server.dart:360:23)
<asynchronous suspension>
#8      main (dart:vmservice_io:239:12)


^C

This worked until a few hours ago, therfore looks like an issue on my site,
but I first saw it fail on Travis. Also reverting code changes doesn’t make it work again.

Any idea?

Author: Fantashit

2 thoughts on “Observatory server failed to start after 1 tries

  1. I solved the same problem after a long time. It is not just the INTERNET permission in AndroidManifest.xml. In my case, I received the same error, but I noticed that my project did not have the debug folder inside app> src.

    I needed to create this folder manually and insert the file AndroidManifest.xml. With the code below:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="your_app_package_name">
        <uses-permission android:name="android.permission.INTERNET"/>
    </manifest>
    

Comments are closed.