AppLifeCycleState.detached is not called when app is closed quickly

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() {
    return _MyHomePageState();
  }
}

class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {

  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addObserver(this);
  }

  @override
  void dispose() {
    WidgetsBinding.instance.removeObserver(this);
    super.dispose();
  }

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    print(state);
  }

  @override
  Widget build(BuildContext context) {

    return WillPopScope(
      onWillPop: () async {
        //do something here before pop
        return true;
      },
      child: Scaffold(
        body: Container(),
      ),
    );
  }
}

I/flutter (29405): AppLifecycleState.paused
I/flutter (29405): AppLifecycleState.resumed
I/flutter (29405): AppLifecycleState.inactive
I/flutter (29405): AppLifecycleState.paused
I/flutter (29405): AppLifecycleState.resumed
I/flutter (29405): AppLifecycleState.inactive
I/flutter (29405): AppLifecycleState.paused
I/flutter (29405): AppLifecycleState.resumed
I/flutter (29405): AppLifecycleState.inactive
I/flutter (29405): AppLifecycleState.paused
Lost connection to device. //i just closed the app now. (pressed overview button and closed the app by swiping)

AppLifecycleState.Detached was not printed.
Nothing was saved in database in my real app.
But if i close the app by pressing the back button,
I/flutter (30178): AppLifecycleState.inactive
I/flutter (30178): AppLifecycleState.paused
I/flutter (30178): AppLifecycleState.detached
detached was called.

WillPopScore is handling the back button press.
So when the user closed app with overview button, i want to store the last activity in database and i want to resume it when the app opens again.
I am making an app for android and ios.
The above code was tested with android in windows.
Flutter 1.17.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f7a6a7906b (7 days ago) • 2020-05-12 18:39:00 -0700
Engine • revision 6bc433c6b6
Tools • Dart 2.8.2

Hi @maheshkumar2150
I tested your code with the latest master
[   +3 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Pixel 3a is available at: http://<IP_ADDRESS>:56690/h8eHhwkXxs0=/
[ +268 ms] I/flutter (25063): initState() called
[+7275 ms] I/flutter (25063): AppLifecycleState.inactive
[  +58 ms] I/flutter (25063): AppLifecycleState.paused
[+2080 ms] I/flutter (25063): AppLifecycleState.resumed
[+1507 ms] I/flutter (25063): AppLifecycleState.inactive
[  +53 ms] I/flutter (25063): AppLifecycleState.paused
[+2081 ms] I/flutter (25063): AppLifecycleState.detached
[ +804 ms] Service protocol connection closed.
[   +3 ms] Lost connection to device.
[   +9 ms] executing: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +8 ms] Exit code 0 from: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +1 ms] 965AY0WP5C tcp:56690 tcp:39929
[   +3 ms] executing: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --remove tcp:56690
[  +16 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.example.master/code_cache/masterLAGHAW/master/)
[ +263 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[   +9 ms] executing: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +9 ms] Exit code 0 from: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +4 ms] "flutter run" took 54,173ms.
[ +262 ms] Running shutdown hooks
[   +1 ms] Shutdown hook priority 4
[   +3 ms] Shutdown hooks complete

doctor
[✓] Flutter (Channel master, 1.19.0-2.0.pre.131, on Mac OS X 10.15.4 19E287, locale en-EE)
    • Flutter version 1.19.0-2.0.pre.131 at /Users/nevercode/development/flutter_master
    • Framework revision 478d4c9c1a (5 hours ago), 2020-05-19 20:22:01 -0700
    • Engine revision 2d4e83921d
    • Dart version 2.9.0 (build 2.9.0-9.0.dev 40f7a11d89)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/nevercode/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (3 available)
    • Pixel 3a   • 965AY0WP5C • android-arm64  • Android 10 (API 29)
    • Web Server • web-server • web-javascript • Flutter Tools
    • Chrome     • chrome     • web-javascript • Google Chrome 81.0.4044.138

• No issues found!

while with the current stable it behaves as you described
[   +3 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Pixel 3a is available at: http://<IP_ADDRESS>:56917/ZnQHWAVVOYE=/
[  +20 ms] I/flutter (25520): initState() called
[+5022 ms] I/flutter (25520): AppLifecycleState.inactive
[  +66 ms] I/flutter (25520): AppLifecycleState.paused
[ +596 ms] I/flutter (25520): AppLifecycleState.resumed
[+6270 ms] I/flutter (25520): AppLifecycleState.inactive
[  +41 ms] I/flutter (25520): AppLifecycleState.paused
[+3523 ms] Service protocol connection closed.
[   +2 ms] Lost connection to device.
[   +7 ms] executing: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[  +10 ms] Exit code 0 from: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[        ] 965AY0WP5C tcp:56917 tcp:37845
[   +2 ms] executing: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --remove tcp:56917
[  +16 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.example.stable/code_cache/stableLQBTZK/stable/)
[   +2 ms] Sending to VM service: _deleteDevFS({fsName: stable})
[ +263 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[   +3 ms] executing: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +8 ms] Exit code 0 from: /Users/nevercode/Library/Android/sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +2 ms] "flutter run" took 51,872ms.

doctor
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-EE)
    • Flutter version 1.17.1 at /Users/nevercode/development/flutter
    • Framework revision f7a6a7906b (7 days ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/nevercode/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.0

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (1 available)
    • Pixel 3a • 965AY0WP5C • android-arm64 • Android 10 (API 29)

• No issues found!

Thank you

What is latest mater? Is it better than stable version? Because it seems to me. Stable has bug but master hasn't.
Can you guide me to upgrade to latest master version?

Hi @maheshkumar2150
please be aware that
it is true that the master channel is the more "up-to-date", but changes very quickly;
the stable version is "more stable".
If you decide to upgrade please follow the docs
Thank you

There is no way to use it in stable?

It is working as expected in Android but in iOS,
detached is not getting called
can anyone verify that it is working in master channel in iOS platform?

tagging @pedromassango  for visibility

I know this is separate issue
but even dispose is not also getting called
when pressed overview button and closed the app by swiping is iOS.

I tested this and here is my feedback
Pressed overview button and closed the app by swiping (master channel)
I/flutter (31534): AppLifecycleState.inactive
I/flutter (31534): AppLifecycleState.paused
I/flutter (31534): AppLifecycleState.detached
Lost connection to device.

Closed the app by pressing the back button (master channel)
I/flutter ( 2482): AppLifecycleState.inactive
I/flutter ( 2482): AppLifecycleState.paused
I/flutter ( 2482): AppLifecycleState.detached

Pressed overview button and closed the app by swiping (stable channel)
I/flutter ( 4328): AppLifecycleState.inactive
I/flutter ( 4328): AppLifecycleState.paused
I/flutter ( 4328): AppLifecycleState.detached

Closed the app by pressing the back button (stable channel)
I/flutter ( 5976): AppLifecycleState.inactive
I/flutter ( 5976): AppLifecycleState.paused
I/flutter ( 5976): AppLifecycleState.detached
Lost connection to device.

The issue
If you press the overview button and closed the app by swiping quickly, then the only method getting called it AppLifecycleState.inactive. And your output will be:
I/flutter ( 9358): AppLifecycleState.inactive
Lost connection to device.

So this is still valid.
flutter doctor -v (stable)
[✓] Flutter (Channel stable, 1.22.4, on Mac OS X 10.15.7 19H2 darwin-x64, locale en)
    • Flutter version 1.22.4 at /Users/pedromassango/dev/SDKs/flutter_stable
    • Framework revision 1aafb3a8b9 (12 days ago), 2020-11-13 09:59:28 -0800
    • Engine revision 2c956a31c0
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin installed
    • Dart plugin version 202.8070

[✓] VS Code (version 1.51.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)

! Doctor found issues in 1 category.

flutter doctor -v (master)
[✓] Flutter (Channel master, 1.24.0-8.0.pre.365, on Mac OS X 10.15.7 19H2 darwin-x64, locale en)
    • Flutter version 1.24.0-8.0.pre.365 at /Users/pedromassango/dev/SDKs/flutter_master
    • Framework revision 2ceb371d21 (11 hours ago), 2020-11-24 17:18:06 -0800
    • Engine revision 6ed357c8b3
    • Dart version 2.12.0 (build 2.12.0-74.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 51.0.3
    • Dart plugin version 202.8070

[✓] VS Code (version 1.51.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (4 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • macOS (desktop)             • macos         • darwin-x64     • Mac OS X 10.15.7 19H2 darwin-x64
    • Web Server (web)            • web-server    • web-javascript • Flutter Tools
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 86.0.4240.198

• No issues found!

I have the same issue, I tested it in to phisical phones
-Redmi Note9 Pro with android 10:
I/flutter ( 4856): AppLifecycleState.inactive
I/flutter ( 4856): AppLifecycleState.paused
I/flutter ( 4856): AppLifecycleState.detached
Lost connection to device.

-Samsung j7 prime with android 8:
I/flutter ( 7847): AppLifecycleState.inactive
I/flutter ( 7847): AppLifecycleState.paused
Lost connection to device.

I think it depends on the android version

I've tested this on iOS Simulators and an iPhone 6 running iOS 12 and detached isn't being called but inactive is. On Android 10 Poco F2 Pro the detached event is being called.

I have the same issue. Any updates?

@haroonkhan9426
check this

Any update on this? Or is there any other way in Flutter to execute a code(say calling a REST API) just before the app is swiped off(detached)?

@pedromassangocode
the issue persists with the latest master and with sound null safety,
(do you mind updating the labels)

code sample
import 'package:flutter/material.dart';

void main() => runApp(const MaterialApp(home: MyHomePage()));

class MyHomePage extends StatefulWidget {
  const MyHomePage() : super(key: const ValueKey('MyHomePage'));

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance?.addObserver(this);
  }

  @override
  void dispose() {
    WidgetsBinding.instance?.removeObserver(this);
    super.dispose();
  }

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) => print(state);

  @override
  Widget build(BuildContext context) => Material(
        child: WillPopScope(
          onWillPop: () async => true,
          child: const Center(child: FlutterLogo(size: 80)),
        ),
      );
}

pubspec
name: issue
description: A new Flutter project.
version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true

doctor
[✓] Flutter (Channel master, 2.1.0-13.0.pre.232, on Linux, locale en_US.UTF-8)
    • Flutter version 2.1.0-13.0.pre.232 at /home/francesco/snap/flutter/common/flutter
    • Framework revision 9f49181f40 (2 hours ago), 2021-03-24 15:46:09 +0800
    • Engine revision d59a01d2d3
    • Dart version 2.13.0 (build 2.13.0-150.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/francesco/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_SDK_ROOT = /home/francesco/Android/Sdk
    • Java binary at: /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~20.04-b08)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /snap/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (3 available)
    • Pixel 3a (mobile) • 965AY0WP5C • android-arm64  • Android 11 (API 30)
    • Linux (desktop)   • linux      • linux-x64      • Linux
    • Chrome (web)      • chrome     • web-javascript • Chromium 89.0.4389.90 snap

! Doctor found issues in 1 category.

logs
[  +90 ms] Syncing files to device Pixel 3a...
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +1 ms] <- recompile package:issue/main.dart 3f5b1d7c-f7d2-4863-8449-5e54397a0088
[        ] <- 3f5b1d7c-f7d2-4863-8449-5e54397a0088
[  +85 ms] Updating files.
[        ] DevFS: Sync finished
[   +1 ms] Syncing files to device Pixel 3a... (completed in 89ms)
[        ] Synced 0.0MB.
[        ] <- accept
[  +17 ms] Connected to _flutterView/0x77f3fbf6f0.
[   +2 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] 💪 Running with sound null safety 💪
[        ] An Observatory debugger and profiler on Pixel 3a is available at: http://<IP_ADDRESS>:33431/1KxSGzo4wGQ=/
[ +754 ms] Activating Dart DevTools...
[+2330 ms] Activating Dart DevTools... (completed in 2,330ms)
[ +659 ms] The Flutter DevTools debugger and profiler on Pixel 3a is available at: http://<IP_ADDRESS>:9101?uri=http%3A%2F%2F<IP_ADDRESS>%3A33431%2F1KxSGzo4wGQ%3D%2F
[+21976 ms] I/flutter (17372): AppLifecycleState.inactive
[ +764 ms] I/flutter (17372): AppLifecycleState.paused
[   +9 ms] I/flutter (17372): AppLifecycleState.detached
[  +29 ms] E/libEGL  (17372): call to OpenGL ES API with no current context (logged once per thread)
[+8635 ms] I/flutter (17372): AppLifecycleState.inactive
[ +145 ms] I/flutter (17372): AppLifecycleState.paused
[ +853 ms] Service protocol connection closed.
[        ] Lost connection to device.
[   +2 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +5 ms] Exit code 0 from: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[        ] 965AY0WP5C tcp:40587 tcp:38771
[   +1 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --remove tcp:40587
[   +8 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.example.issue/code_cache/issueTAFPVQ/issue/)
[ +257 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[   +5 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[  +21 ms] Exit code 0 from: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +5 ms] "flutter run" took 125,130ms.
[ +168 ms] ensureAnalyticsSent: 162ms
[   +5 ms] Running shutdown hooks
[   +1 ms] Shutdown hooks complete
[   +2 ms] exiting with code 0

Hi I am facing the same issue any update on this ?

Same problem not able to detect detached on my real device, Any update on this would be appreciated

Same problem not able to detect detached on my real device, Any update on this would be appreciated

+1

I also encountered this problem, which can appear in iOS.(Flutter (Channel stable, 2.5.1, on macOS 11.5.2 20G95 darwin-arm, locale zh-Hans-CN))

i am also facing same issue, any solution for this?

i'm also facing the same issue. I'm trying to make an API call on AppLifeCycleState.detached when app closed in iOS by swiping from the app drawer. but the API call is not being made.

The same thing happens to me, doesn't the Detached take me, with a galaxy a10s or emulator, any updates?

Hi, I'm working with the latest master branch and I'm facing the same issue when I use any other state then the code is working but when I use detached state then the code is not working so can anyone help me how can I make the code inside the detached state to work.
Here is the code snippet on which I'm working.
@override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    super.didChangeAppLifecycleState(state);
    // the  below line of code is for debugging purpose
    // print("The current state of the app is: $state");

    setState(() {
      _appLifecycleState = state;

      // the code below is used to check that if the app life cycle is
      // in inactive state then cancel the notification using the cancel
      // method
      if (_appLifecycleState == AppLifecycleState.inactive) {
        // service.flutterLocalNotificationsPlugin.cancel(0);

        service.sendNotificationToUser(
            notificationTitle: "checking App state",
            notificationBody: "This App is in $_appLifecycleState state");
      } else if (_appLifecycleState == AppLifecycleState.detached) {
        // service.flutterLocalNotificationsPlugin.cancel(0);

        service.sendNotificationToUser(
            notificationTitle: "checking App state",
            notificationBody: "This App is in $_appLifecycleState state");

        // the below line of code is for debugging purpose
        print("The state of the app is: $_appLifecycleState");
      } else {
        // the  below line of code is for debugging purpose
        // print("The current state of the app is: $_appLifecycleState");
      }
    });
  }

I am having the same issue on Android and iOS, any updates?

Is there any solution? Still continue?

ya getting same issue

The same issue. Is there any solution?

I am having same issue.
Is there any solution?

same issue, detach only called when user exit from back button.

any updates ?

I can see the issue has labels only for the Platform-android. can anyone with access add Platform-ios as well as the same behaviour is reproducible in iOS as well

Same issue with Flutter 3.0.1

Come on... This and also dispose() ? How can this still not be fixed ? It really is an important thing 😭

Same issue with Flutter 3.0.1

i am using 3.0.5 and this issue persists in android(only checked that). i will be okay downgrading the flutter version. can someone confirm which last stable version will not have this issue?

The described behavior here is that you are killing the application; when that happens, there is no guarantee from the OS that any further code will run; mobile apps just don't work that way. This is a fundamental limitation of the platforms, and thus not something that Flutter can change.


Replace mailhog

See https://github.com/mailhog/MailHog/issues/399, mailhog seems dead.
A new fork/rewrite:  https://github.com/axllent/mailpit

Go for the replacement, we can use the tap I have created : https://github.com/Akollade/homebrew-tap


Expand type parameter with union bounds

This is the first task to fix https://github.com/oyvindberg/ScalablyTyped/issues/11
interface C {
  c?: number
}

interface B {
  b: string;
}
interface Example {
    foo<T extends C | B>(bc: T): T
}

We'll generate
interface Example {
    foo(bc: B): B
    foo(bc: C): C
}

Fixed and published


author buttons for trivia set mode command is not working

for some reason they return interaction failed, the commands with author buttons that are not affected by this is the slash_enable command for bot developers

currently looking into it

note: this only happens on latest build of 1.7.0-beta

Fixed in beta


npm ERR! could not determine executable to run

PS C:\Users_> npx js-deobfuscator -h
npm ERR! could not determine executable to run
npm ERR!      C:\Users_\AppData\Local\npm-cache_logs\2023-01-05T07_22_49_314Z-debug-0.log
1 info using<EMAIL_ADDRESS>2 info using<EMAIL_ADDRESS>3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:\Users\_\.npmrc Completed in 0ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:C:\Users\_\AppData\Roaming\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:setEnvs Completed in 1ms
15 timing config:load Completed in 10ms
16 timing npm:load:configload Completed in 10ms
17 timing npm:load:mkdirpcache Completed in 0ms
18 timing npm:load:mkdirplogs Completed in 0ms
19 verbose title npm exec js-deobfuscator -h
20 verbose argv "exec" "--" "js-deobfuscator" "-h"
21 timing npm:load:setTitle Completed in 1ms
22 timing config:load:flatten Completed in 2ms
23 timing npm:load:display Completed in 3ms
24 verbose logfile logs-max:10 dir:C:\Users\_\AppData\Local\npm-cache\_logs\2023-01-05T07_22_49_314Z-
25 verbose logfile C:\Users\_\AppData\Local\npm-cache\_logs\2023-01-05T07_22_49_314Z-debug-0.log
26 timing npm:load:logFile Completed in 4ms
27 timing npm:load:timers Completed in 0ms
28 timing npm:load:configScope Completed in 0ms
29 timing npm:load Completed in 19ms
30 silly logfile start cleaning logs, removing 2 files
31 timing config:load:flatten Completed in 0ms
32 silly logfile done cleaning log files
33 timing arborist:ctor Completed in 0ms
34 timing arborist:ctor Completed in 0ms
35 http fetch GET 200 https://registry.npmjs.org/js-deobfuscator 219ms (cache revalidated)
36 timing command:exec Completed in 323ms
37 verbose stack Error: could not determine executable to run
37 verbose stack     at getBinFromManifest (C:\Program Files\nodejs\node_modules\npm\node_modules\libnpmexec\lib\get-bin-from-manifest.js:17:23)
37 verbose stack     at exec (C:\Program Files\nodejs\node_modules\npm\node_modules\libnpmexec\lib\index.js:187:15)
37 verbose stack     at async module.exports (C:\Program Files\nodejs\node_modules\npm\lib\cli.js:133:5)
38 verbose pkgid<EMAIL_ADDRESS>39 verbose cwd C:\Users\_
40 verbose Windows_NT 10.0.22621
41 verbose node v19.3.0
42 verbose npm  v9.2.0
43 error could not determine executable to run
44 verbose exit 1
45 timing npm Completed in 361ms
46 verbose code 1
47 error A complete log of this run can be found in:
47 error     C:\Users\_\AppData\Local\npm-cache\_logs\2023-01-05T07_22_49_314Z-debug-0.log

Hi have you tried https://stackoverflow.com/a/69936918

Hi have you tried https://stackoverflow.com/a/69936918

Yes I have

I have same issue

Same issue

same for me

Should be fixed now 👍


📢 Upcoming Migration of Components to a New GitHub Organization (CODE FREEZE 11/12 - 11/17)

Hello, Cloud Posse Community!
We’re excited to announce that starting on November 12, 2024, we will begin migrating each component in the cloudposse/terraform-aws-components repository to individual repositories under a new GitHub organization. This change aims to improve the stability, maintainability, and usability of our components.
Why This Migration?
Our goal is to make each component easier to use, contribute to, and maintain. This migration will allow us to:

Leverage terratest automation for better testing.
Implement semantic versioning to clearly communicate updates and breaking changes.
Improve PR review times and accelerate community contributions.
Enable Dependabot automation for dependency management.
And much more!

What to Expect Starting November 12, 2024

Migration Timeline: The migration will begin on November 12 and is anticipated to finish by the end of the following week.
Code Freeze: Starting on November 12, this repository will be set to read-only mode, marking the beginning of a code freeze. No new pull requests or issues will be accepted here after that date.
New Contribution Workflow: After the migration, all contributions should be directed to the new individual component repositories.
Updated Documentation: To support this transition, we are updating our documentation and cloudposse-component updater.
Future Archiving: In approximately six months, we plan to archive this repository and transfer it to the cloudposse-archives organization.

Frequently Asked Questions

Does this affect Terraform modules? No, only the terraform-aws-components repository is affected. Our Terraform modules will remain where they are.

We are committed to making this transition as seamless as possible. If you have any questions or concerns, please feel free to post them in this issue. Your feedback is important to us, and we appreciate your support as we embark on this new chapter!
Thank you,
The Cloud Posse Team

Will there be any guidance on how to update our reference architectures to use this new setup?

@mtb-xt for sure
We prepared PR to component-updater GHA that will migrate components to the new org smoothly.
But we will also create documentation on how you can migrate manually.

@mtb-xt just to clarify what @goruha said, we've updated the component-updater GitHub Action to automatically rewrite the sources when it opens the PRs. This should make the upgrade transparent and painless.

Very cool. Looking forward to seeing all the components tested.

Will all the same components be available after the migration?

Will components still be open source?

What will the new organization be named?
Looked through the source code of the component updater and saw this https://github.com/cloudposse-terraform-components

Will the component updater be updated to allow overriding the above org to use different sources if needed?

Would you folks consider opening up the codeowners for components once they are all in their own repositories like you folks do with terraform modules ?

Thanks!

@nitrocode thanks for raising these questions.

Will all the same components be available after the migration?

Yes, we're migrating the components as is, bit-for-bit, to facilitate a switch. However, we anticipate promptly doing major releases on many of the components after that point, to introduce new functionality and improve brownfield infra (a large driver for the initiative). Those breaking changes will likely require local changes in your configurations. That won't happen immediately, but is the reason we're doing all this.

Will components still be open source?

Yes, we have no plans to change license.

What will the new organization be named?
Looked through the source code of the component updater and saw this https://github.com/cloudposse-terraform-components

Correct,  you found it!
https://github.com/cloudposse-terraform-components
As part of our transition to GitHub Enterprise (GHE), we are reorganizing our open-source projects into more purpose-built organizations. This allows us to better manage repository rulesets, GitHub Apps, and other configurations specific to each organization's purpose. This approach enhances our security posture and improves discoverability. Additionally, keeping our components separate from less opinionated child modules avoids confusion and ensures clearer organization.

Will the component updater be updated to allow overriding the above org to use different sources if needed?

The component updater uses the sources as define in the vendor and component manifests. Thus, that's supported today.
One thing we've added to the component updater to make this switch less painful, is the ability for it to rewrite the sources to their new homes. So if it see's references to components in cloudposse/terraform-aws-components it will rewrite those to the new locations.

Would you folks consider opening up the codeowners for components once they are all in their own repositories like you folks do with terraform modules ?

Yes, so we'll be able to accept more contributions of components and delegate ownership of components with this move. Note, CODEOWNERS only works with paid GitHub seats, so I think we'll continue to look for solutions that work better for non-org members, such as "allow lists" that we've implemented elsewhere.

 It's probably too late now to see if that can be retained, but I wanted to point it out in case others were looking for older history, then it would be good to archive terraform-aws-components repo for posterity.

@nitrocode I re-run the migration script and copied the git history.
It was impossible to preserve commit sha, but we got history, references to PRs, and commit authorship .
You can check this repo as an example https://github.com/cloudposse-terraform-components/aws-bastion/commits/main/

Awesome, I see the history now. Thank you!

Last nitpick, I see the references in the readme for each component often link back to this repo which is soon to be archived.
E.g. https://github.com/cloudposse-terraform-components/aws-iam-role?tab=readme-ov-file#references


Refactor Role model to use Pydantic

Refactor Role model to use Pydantic
Call Role.parse_obj() to instantiate roles from dicts
Refactor update_role_data() to not mutate role object, but instead return an updated instance
Send role_id to DURING_REPOABLE_CALCULATION hook
Update tests for all of the above

Coverage increased (+0.4%) to 61.766% when pulling 38921ef8dccf2c2e2a97c7d76fa2338c36c5751e on pydantic into 5092f8bcd8466397df95951aa8bb7bed55213863 on master.


routerLink overrides @click function in vue block

PHP Version
8.3.8
Shopware Version
<IP_ADDRESS>
Affected area / extension
Platform(Default)
Expected behaviour
Click on a button with a routerLink and a vue click event.
Both should be executed synchron
Actual behaviour
the vue click function will be overwritten with the routerLink option.
That way it leads to the routerLink but does not execute the code in the @click block
How to reproduce
Create a sw-button and add the parameters:
:routerLink="{ name: 'router.index' }"
@click="onClick"

and create a method function:
onClick() {
     alert('Hello');
}

The alert will not be executed.
Maybe I am just dumb and this is the intended way. If yes: how should I link to a route while the on Click is executed?

[public] Shopware automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/NEXT-38053.
This link is only intended for Shopware employees and for internal use only.
[created from NEXT-38053, comment 490280]

just wanted to add that the same happens when you use a routerLink and a isLoading
as long the routerLink is set isLoading will be ignored


chore(java-client-ci): build the server instead of downloading it from external site

https://github.com/apache/incubator-pegasus/issues/1779
Build Pegasus server binaries in the CI procedure instead of downloading it from any site.

The failed test ReplicaSessionTest.testConnect is a known issue, @Samunroyu is palnning to fix it.


Fix bug with InSet and Strings

This fixes #433
Literal.apply does not work if the value is a UTF8String.  This fixes that issue.

build

build

@abellina any more concerns?


Supporting sections in ListView

Closes
✅ Pull Request Checklist:

[ ] Included link to corresponding React Spectrum GitHub Issue.
[ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
[ ] Filled out test instructions.
[ ] Updated documentation (if it already exists for this component).
[ ] Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:
RSP

PR is in a functionally stable state now (behavior/implementation wise). Will either revisit when a RAC collection transition happens to ListView or we can aim to review/move ahead with this as is.


Use bun official images

Hey 👋🏻
I've been using Bun for quite some time now, and it seems stable for use with Rails.
I was checking the Docker ecosystem for Bun and turns out that they have official images now. I toyed around a little bit and manage to use the official image instead of manually install Bun like this:
FROM oven/bun:1 as bun

# Install node modules
COPY --link package.json bun.lockb ./
RUN --mount=type=cache,id=bld-bun-cache,target=/root/.bun \
    bun install --frozen-lockfile

FROM prebuild as build

# Install application gems
COPY --link Gemfile Gemfile.lock .ruby-version ./
RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \
    bundle config set app_config .bundle && \
    bundle config set path /srv/vendor && \
    bundle install && \
    bundle clean && \
    mkdir -p vendor && \
    bundle config set path vendor && \
    cp -ar /srv/vendor .

# Copy bun modules
COPY --from=bun /home/bun/app/node_modules /rails/node_modules
COPY --from=bun /usr/local/bin/bun /usr/local/bun
ENV PATH=/usr/local/bun/bin:$PATH

Changes needed were
- FROM prebuild as bun
+ FROM oven/bun:1 as bun # it could point to version and OS like `1-alpine` and so on

# on the prebuild stage

- COPY --from=bun /rails/node_modules /rails/node_modules
+ COPY --from=bun /home/bun/app/node_modules /rails/node_modules

- COPY --from=bun /usr/local/bun /usr/local/bun
+ COPY --from=bun /usr/local/bin/bun /usr/local/bun/bin/.

what are your thoughts on this one?

Copying between base images makes me nervous.  Copying between alpine and debian, for example, is likely to cause problems.  Copying between debian bullseye and debian bookworm is likely -- but not guaranteed -- to work.
It looks like the latest bun debian image is based on 11.8 (bullseye).  The latest ruby image is based on 12.4 (bookworm).  That being said, what really matters is the output of ldd, for example:
# ldd `which bun`
	linux-vdso.so.1 (0x00007ffd5f79e000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb9edd98000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb9f4281000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb9edd76000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb9edd70000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb9edc2c000)

What you are relying on is these files in the /lib/x86_64-linux-gnu being present in the Ruby image, which means both installed and matching the version number.  It seems that these files match (for the moment?) between 11.8 and 12.4.
Curiously, the alpine images also match the version numbers above -- it is much more common to use musl rather than libc as the runtime on alpine.  Unsurprisingly, libc is not present in the ruby:alpine image, so I suspect that the above approach will fail on alpine -- even if you are copying between oven/bun:alpine and ruby:alpine -- unless you also take care to copy the necessary files from the /lib64 directory.

did not know that. then I think it is a bad idea
also, I checked the image size difference with copying from the base image vs installing and copying from the base image duplicates the size
bad idea overall, closing it now
thanks for the explanation!


ARROW-11938: [R] Enable R build process to find locally built C++ library on Windows

Changes

[x] Allow Windows R build to detect ARROW_HOME variable and use those binaries
[x] Get Windows R build working with static libraries and RTools 4.0
[x] Get Windows R build working with dynamic libraries and older RTools.
[x] Update R developer documentation to include Windows instructions

mingw64 and mingw32 are working, but ucrt64 isn't working for me yet. (Getting ERROR: loading failed; it seems to crash 64-bit R.) Maybe I need a UCRT-specific build of R?
I'd like to defer on the ucrt64 instructions and maybe complete them as part of https://issues.apache.org/jira/browse/ARROW-13683.

This is really great, I'm going to trigger a crossbow build [1] against this branch. The CI build I'm triggering takes the contents of the devdocs and turns them into a script that is then run (to confirm that the steps here actually produce the outcome we would like.
You might have noticed save=run & macos or save=run & linux
We don't necessarily have to add windows to this in this PR or right away (though if we are going to defer it, we should make a Jira for it). If you do want to see how this works, basically we take this special github actions workflow and run it through github actions (there's more complications here, but that's the basic idea)
[1] crossbow, if you're not already familiar is our extend CI system for running CI jobs that don't need to be run on every commit/pr.

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@jonkeane Took a little bit, but got the CI check working. It helped me remember to make sure the configure.win file supported turning off optional components, which was helpful.
This should be ready for review. cc @nealrichardson @ianmcook

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs

@github-actions crossbow submit test-r-devdocs


Convert formatting to tabs instead of spaces

There were still some lingering space/tab issues on your PR, so I fixed them. Once you merge this, it should add the commits to your PR and then I can merge your original chadly/geocoding.net#60.
Phew...never done a PR on a PR before 😄

It would be typical that on my first PR this sort of thing would happen :)


[VS Code] The user code is invalid or expired. Try signing in again.

Error:
The user code is invalid or expired. Try signing in again.
Steps to Reproduce:

Version Data

extensionName
VSLS

extensionVersion
0.3.666

protocolVersion
2.2

applicationName
VSCode

applicationVersion
1.27.1

platformName
Linux

platformVersion
4.15.0-33-generic

For security reasons, the code that you copy from the login page only has a short valid time; I think it is 2 minutes. So if you try to try to use it after a longer delay, then you'll get this error message. I'm going to go ahead and resolve this issue as by design, but if you're seeing some unexpected behavior feel free to reactivate with more details.


Add solution to LC problem 3030

Is there an existing issue for this?

[X] I have searched the existing issues

Issue Description
Find the Grid of Region Average
Suggested Change
Find the Grid of Region Average
Rationale
No response
Urgency
High
Acknowledgements

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository
[X] I have read and followed the Contribution Guidelines
[X] I have followed the code style guidelines of this project
[X] I have checked for any existing open issues that my pull request may address
[X] I have ensured that my changes do not break any existing functionality
[X] Each contributor is allowed to create a maximum of 4 issues per day. This helps us manage and address issues efficiently
[X] I have read the resources for guidance listed below
[X] I have not used AI-generated content (e.g., ChatGPT, other AI tools)
[X] I have not used content from existing sites (e.g., text, images)
[X] I have followed all security rules and only shared trusted resources

@Ajay-Dhangar, review this PR


Proposal: Consistent use of "must" and "should"

I propose updating the titles, messages, and descriptions of all rules to be consistent with the following:

Default severity
Wording

Hidden/Info
May

Warning
Should

Error
Must

:+1: But we will be needing clear guidelines on when a diagnostic will be marked as error.

when a diagnostic will be marked as error.

No diagnostics are currently or planned to be marked as error.

That definitely is a clear guideline :smile:

The standard for May, Should, Must comes from RFC 2119 (https://tools.ietf.org/html/rfc2119). We should consider updating the documentation of rules to use RFC 2119 consistently.


Tests Directory Empty?

I am trying to test an API client I've written using Guzzle using the three methods documented here: http://docs.guzzlephp.org/en/latest/testing.html.
I am unable to use the testing web server (Server class), because my entire tests directory is empty. I've checked into previous releases of Guzzle 4 and 5 to see that the tests directory is not empty on those releases. However, Guzzle 6's tests directory is empty on all releases and thus when I install via Composer.
What am I missing?

The tests, docs, and build directories are not included in the standard composer distribution. (This is done via export-ignore directives in the .gitattributes file, which both Composer and GitHub use to determine what files and directories should be excluded from a release.)
You can direct composer to fetch the repository via git pull with the --prefer-source flag if you would prefer to install the entire repository.


refactor!: re-export async loadImage from @napi-rs/canvas

This new feature of @napi-rs/canvas, loadImage, is async, which makes this PR https://github.com/kyranet/canvas-constructor/labels/semver:major .

is this correct as body @kyranet ?
BREAKING CHANGE: `loadImage` is now an async function returning a `Promise`

Yes - also supports more inputs such as from FS, HTTP, etc.


strange train_loss

🐛 Bug
Logging train_loss both from return and self.log gives different outputs. They are both also not a running avergae of my manually printed losses - can you please point me to how they are computed? it is not immediately clear from the outputs
    def training_step(self, batch, batch_idx) -> Dict:
        t0 = time.time()
        loss_tensors, logits = self._step(batch)
        train_time = time.time() - t0
        logs = {name: loss for name, loss in zip(self.loss_names, loss_tensors)}
        logs["tpb"] = batch["input_ids"].ne(self.pad).sum() + batch["labels"].ne(self.pad).sum()
        logs["batch_train_time"] = train_time

        print(loss_tensors[0])
        self.log("train_loss", loss_tensors[0], on_step=True, prog_bar=True, logger=True, sync_dist=True)
        return {"loss": loss_tensors[0], "log": logs, "progress_bar":{"global_step":self.global_step}}

Outputs look like:
tensor(695.5908, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:   3%|▎         | 1/30 [00:01<00:48,  1.68s/it, loss=1409.850, v_num=87, train_loss=705, global_step=0]tensor(688.4814, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:   7%|▋         | 2/30 [00:01<00:27,  1.03it/s, loss=1392.687, v_num=87, train_loss=688, global_step=1]tensor(645.7902, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:  10%|█         | 3/30 [00:02<00:19,  1.35it/s, loss=1358.177, v_num=87, train_loss=645, global_step=2]tensor(711.6373, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:  13%|█▎        | 4/30 [00:02<00:16,  1.61it/s, loss=1371.488, v_num=87, train_loss=706, global_step=3]tensor(680.3423, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:  17%|█▋        | 5/30 [00:02<00:13,  1.82it/s, loss=1374.843, v_num=87, train_loss=694, global_step=4]tensor(672.1014, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:  20%|██        | 6/30 [00:03<00:12,  2.00it/s, loss=1390.955, v_num=87, train_loss=736, global_step=5]tensor(700.9694, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:  23%|██▎       | 7/30 [00:03<00:10,  2.14it/s, loss=1391.849, v_num=87, train_loss=699, global_step=6]tensor(702.0041, device='cuda:0', grad_fn=<AddBackward0>)
Epoch 0:  27%|██▋       | 8/30tensor(714.2592, device='cuda:1', grad_fn=<AddBackward0>)loss=672, global_step=7]
tensor(687.0416, device='cuda:1', grad_fn=<AddBackward0>)
tensor(643.3681, device='cuda:1', grad_fn=<AddBackward0>)
tensor(699.7834, device='cuda:1', grad_fn=<AddBackward0>)
tensor(707.9196, device='cuda:1', grad_fn=<AddBackward0>)
tensor(799.4126, device='cuda:1', grad_fn=<AddBackward0>)
tensor(696.2469, device='cuda:1', grad_fn=<AddBackward0>)
tensor(641.3730, device='cuda:1', grad_fn=<AddBackward0>)

Please reproduce using [the BoringModel and post here]
https://colab.research.google.com/drive/13Neon4ncn5iwYYY1giuNrOaXcrIx4VQu#scrollTo=quj4LUDgmFvj
Expected behavior
train_loss and loss should be same. I would simply not return {loss:loss} but I need to return some stats like tpb for processing and hence have to.
Environment

CUDA:

GPU:

Tesla T4

available:         True
version:           10.1

Packages:

numpy:             1.18.5
pyTorch_debug:     True
pyTorch_version:   1.7.0+cu101
pytorch-lightning: 1.0.7
tqdm:              4.41.1

System:

OS:                Linux
architecture:

64bit

processor:         x86_64
python:            3.6.9
version:           #1 SMP Thu Jul 23 08:00:38 PDT 2020

See the note here:
https://pytorch-lightning.readthedocs.io/en/stable/new-project.html#logging

The loss value shown in the progress bar is smoothed (averaged) over the last values, so it differs from the actual loss returned in train/validation step.

The logger will show the true value per step.
Let me know if that answers your question.

I'm logging train_loss with self.log() and loss by returning from training_step in the progress bar. I'm also just manually printing loss. All three values are different

First of all, don't mix the self.log with the old API for logging. Here, I fixed it:
    def training_step(self, batch, batch_idx):
        loss_tensors, logits = self._step(batch)
        print(loss_tensors[0])
        self.log("train_loss", loss_tensors[0], on_step=True, prog_bar=True, logger=True, sync_dist=True)
        return loss_tensors[0]

There are 3 things:
(a) the loss returned from the method
(b) the loss showing in the logger (i.e TensorBoard)
(c) the loss shown in progress bar
The value of (a) will be different on each GPU. Since you have 2 gpus, call these values L0 and L1. That's why when you print it you will see the value L0 with device 0 and L1 with device 1 printed.
Then we have self.log: This will do 2 things.
(b) It logs the values into TensorBoard. Because you have dync_dist=True, it will compute (L0 + L1) / 2 and log that value.
(c) It writes to the progress bar. Because you set sync_dist=True, it will compute (L0 + L1) / 2. In addition, the values in the bar will be a running average over a window (sliding window).
For this reason, you see 3 different values. This is expected.
Check for yourself: Take the value L0 and L1 and compute the average manually, then compare it with what appears in TensorBoard.

I need to return some values (like tokens in a batch) from the function which is why I'm using the old API for returning as well.
it looks like self.log prints avg and return function prints sum in progress bar - Thanks for your time!


fix: Get growing segment id when growing info is in GrowingSegments

Growing segment could be in GrowingSegments or GrowingSegmentIDs field in LeaderView
This handles either case when get segment distribution

/lgtm


C3 by DOM

Hi all,
I have issue with the DOM declaration of C3.
var CB = $('

').addClass("infoCB")
    .append('

')

var chart = c3.generate({
    data: {
        bindto: '#chart',
        columns: [
            ['free', 20],
            ['used', 80],
        ],
        width: '100px',
        type: 'donut'
    }
});

Why doens't work ?
I have also tried to add :
$('#chart').data('c3-chart', chart);

but nothing changed. Could you please help me ?
only FYI, the div is .append on click event.
Thanks a lot,
NoC

The issue here is not related to c3. I believe you have misunderstood what your JQuery statement is doing. For c3.generate to work, the target element must be in the DOM when the method is called.
Your JQuery creates a pair virtual element (which look like "

"), but these elements are never added to your page DOM.
I suspect you want something closer to this:
var onClickCallback = function () {
  var CB = $('#someId').addClass("infoCB").append('

');
  var chart = c3.generate({
    data: {
      bindto: CB, // C3 will accept an element reference here, or an ID selector
      columns: [
        ['free', 20],
        ['used', 80],
      ],
      width: '100px',
      type: 'donut'
    }
  });
};

As this is not a C3 problem, please close this issue. Support request are better directed to our Gitter channel, or in this case to the JQuery community.

Closing as not an issue.

thanks for the replay, I tried but ... doesn't work. Could you suggest me a way to create chart with dynamically div creation ?

Try changing the CB line to this:
var CB = $('

').addClass("infoCB")
    .append('

').appendTo('body');

The key is you need to append it somewhere that already exists.

I am also having issue turning a DOM element into a chart object. My charts are displayed correctly but  I have more of them and I tryed:
$('.c3').each(function () {
                            var chart = $(this).data('c3-chart');
                            chart.flush();//undefined
                        });

Any ideeas?

@MihaiBratulescu The var chart = line won't do anything because you can't get an instance of C3 from a chart via jQuery. I'd recommend storing the return of c3.generate into an array somewhere and then just iterating through that if you need to flush.
In the future though, please ask support questions on Gitter or the Google Group!


Disable publishing of partners organisations information.

What

[x] publishing workflow for the partners organisation is hidden and disabled (hence it shouldn't show the workflow state like draft, completed as can be seen below)
[x] partner organisation is not clickable and data is not possible to enter (currently you can click the organisation and see the details and add further information)

We need to see how many organisations have published the partner organisations' data and need to decide what to go about it.
Why
See here https://github.com/younginnovations/aidstream/issues/134
cc @sachit-singh

@anjesh the changes has been pushed to production


Container doesn't register on Docker rootless version

Hi,
I am using Docker in rootless mode and encounter a problem with the specific osixia/phpldapadmin image.
A docker pull osixia/phpldapadmin:stable or any of its version (:latest, :0.9.0 etc...) leads to this error message :
latest: Pulling from osixia/phpldapadmin
1ab2bdfe9778: Already exists
0abcaf321aa9: Already exists
6d688c3d4e02: Already exists
454331b99b9a: Pull complete
5cada7c8cb4e: Pull complete
b0f406024ee7: Pull complete
b04a43f9c3ac: Pull complete
92a3a5c2b5a5: Extracting [==================================================>]  34.17kB/34.17kB
e4955dcfbe65: Download complete
failed to register layer: Error processing tar file(exit status 1): failed to mknodChar0UserNS("/container/service/:apache2/install.sh"): failed to mount overlay (lowerdir=/container/service/:apache2/mc0o793276857/l,upperdir=/container/service/:apache2/mc0o793276857/u,workdir=/container/service/:apache2/mc0o793276857/w) on /container/service/:apache2/mc0o793276857/m: no such file or directory

Another thing : osixia/openldap:1.3.0 pulls perfectly fine
Docker version : 19.03.8, build afacb8b7f0
OS : Ubuntu 18.04 (bionic)
It works perfectly fine on a classic non-rootless Docker install. Do you have an idea why it fails ?
Thank you for your help.

Try overlay2?

docker-phpLDAPadmin is based on osixia/light-baseimage which is based on phusion/baseimage which can't run rooless as well...
for evidence:
$ docker run --user 1000 --rm -it phusion/baseimage:jammy-1.0.1
Unable to find image 'phusion/baseimage:jammy-1.0.1' locally
jammy-1.0.1: Pulling from phusion/baseimage
2b55860d4c66: Pull complete
8e058277d049: Pull complete
cac814e1eefd: Pull complete
Digest: sha256:7faf4efcd96870fe090d969703ef8e727cc9de4f465c8442047ffd26f8094e6b
Status: Downloaded newer image for phusion/baseimage:jammy-1.0.1
*** Killing all processes...
Traceback (most recent call last):
  File "/sbin/my_init", line 414, in <module>
    main(args)
  File "/sbin/my_init", line 330, in main
    import_envvars(False, False)
  File "/sbin/my_init", line 90, in import_envvars
    for envfile in listdir("/etc/container_environment"):
  File "/sbin/my_init", line 74, in listdir
    return sorted(os.listdir(path))
PermissionError: [Errno 13] Permission denied: '/etc/container_environment'


Update about-comparing-branches-in-pull-requests.md

Why:
Closes:

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

[ ] I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).

For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.

[ ] For content changes, I have completed the self-review checklist.

@VimaleshCT Thanks for opening a PR! Please fill out the pull request template in the top comment in this pull request, then we'll get this up for review!


After installation, It Wont run

I just folllowed the old hidden run installation method. now i am getting following error as shown in figure.

@aizaz321 what code did you use to activate ??

@aizaz321 what code did you use to activate ??

what you mean?. i just want to execute hidden eye reborn but it didnt execute. it show errors. you can see my command to execute hidden eye reborn

@aizaz321 me too it is the same thing but I wanted to know the code that you typed for the execution maybe you made a mistake

Imagine following old instructions for new software.. Those are two completely different projects

So you show us the new method please ??

This is not ready for END USER in other words this is still in development


BUG:Pagination is not working in blog section

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
in our blog section pagination is disabled
we can not move anywhere by clicking number ans older,newer links as  well

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

@Durgesh-Vaigandla @CSEdgeOff
i want to work on this issue please assign m this issue

@Yashgabani845 Make sure that new page needs to display remaining posts which are in the posts folder

I want to work on this issue can you assign me this issue


join_cluster missing in alpine image?

The Dockerfile copies "join_cluster.sh", in Dockerfile.aloine it's missing. I guess it's just forgotten there?

@micw Thanks. Good catch, the Alpine file will also need this.

👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

BTW, what is the purpose of this file? Seems to be referenced at no place except the Dockerfile.
Same with rand_cluster_node.escript - it's in bin but not even referenced from any Dockerfile.

It' used to retry cluster joins. See https://github.com/vernemq/docker-vernemq/blob/02b0bdc381e56da814aa7f4a429ea7b679f4022c/bin/vernemq.sh#L346C5-L346C17
rand_cluster_node is not used anymore. It served to select a random cluster node.

👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

should be fixed now. (2.0.0 images)

👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.


Add license texts

The crates in this repository are licensed under MIT OR Apache-2.0 according to the cargo metadata, but don't actually include the license texts, which is technically a requirement for MIT. This PR adds the license texts to the repo and ensures they'll be included in all packaged crates.

I totally forgor about this, much appreciated! :heart:

I'm planning to release a new version with those changes later this week, along with autocomplete fixes for fish.

Great, thank you!

@davide125 Sorry for the delay, 0.9.14 should be out now.


Drop generic copy_to_results rule

Drops the copy_to_results rule and adjusts workflow accordingly..
Note that this may end up with more files in hippunfold dir (e.g. corobl space surfaces)

@jordandekraker a heads up, in case you have any other active branches, as this makes a number of refactoring changes while replacing the copy_to_results rule..


Speed up update_covgs

Currently takes about 10 mins for a single nanopore read, and 1 PRG, everything else takes seconds.

ping @rmnorris

Seems to have fixed with other bug fixes. Alternative code which doesn't iterate through map so many times has been added, but commented out (in src/utils commented out, in src/localPRG second function left uncalled)

Cool

Ah - and the alternative code which avoids iterating through maps/sets is actually slower

On the 2 short examples I tried, by a few seconds. The two methods may scale differently with number of prgs/hits though

OK, fine


Wrong folder name in default config.yml

https://github.com/Lixody/Eir/blob/f545b25096953ff90d7e47ff5b8e32fb547bb194/PHPAnalysis/PHPAnalysis/config.yml#L33-L35
They should be JSONSpecifications and StoredSQLProviders, takes me some time to figure out the config problem :)

The config.yml file is only uploaded due to compilation issues. Originally it wasn’t part of the repository since one should do reconfiguration matching ones environment using the config file template.


iOS 7 auto layout exception.

Hello, getting the exception on iOS 7.1.2 on iPhone 4, on iOS 8 and 9 everything works good.
Here is text of exception:
Fatal Exception: NSInternalInconsistencyException
Auto Layout still required after executing - layoutSubviews.
KMPlaceholderTextView's implementation of -layoutSubviews needs to call super.

Hi, could you give me a demo to reproduce the issue?


Interact with the Repository

Send DM to reviewer
Send message to slack about New Issue, PR comment etc

:tada: opening and closing an Issue Sends "Hello! Event "issues" in "ShivamTyagi12345/Kritagya--Repository-Monitor-slackbot" :nerd_face:"

:green_circle: When a PR gets merged in Main Branch I get a slack Chime

:100: Get build reports from Jenkins


[GHSA-3c7p-vv5r-cmr5] Incorrect Authorization in Apache Solr

Updates

References

Comments
The patch for SOLR-14663 (CVE-2020-13957) is in 8.6.3, not 8.6.2 - https://github.com/apache/solr/commit/e001c2221812a0ba9e9378855040ce72f93eced4. Furthermore, since there is no LTS patch for 7.x and the Solr project itself is only tracking fixes for 8.x/9.x (see SOLR-14925 https://issues.apache.org/jira/browse/SOLR-14925), if the 7.x version is to be the minimum version bump required to fix the issue it should agree with the 8.x patch which is 8.6.3.

@kurt-r2c Thank you for bringing this up. It looks like this was initially patched in 8.6.3, and the inclusive upper bounds for the lower versions were mistaken as fix versions.


Explorer support for sBTC

Track sBTC-related work in Explorer:

[ ] Create an FT page

Not necessary for sBTC, but nice to have:

[ ] List all SIP-10 tokens +  search capability depends on this API issue
[ ] Search transactions by memos

Related https://github.com/hirosystems/explorer/issues/1248

Related https://github.com/hirosystems/explorer/issues/1328 (sBTC transaction types)

Signer page and blocks pages are ready, we'll open a new issue when we start working on sBTC


Range requests support isn't properly detected

Attach (recommended) or Link to PDF file here: https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf
Configuration:

Web browser and its version: Chrome Version 64.0.3282.167 (Official Build) (64-bit), Firefox 52.8.0
Operating system and its version: Debian GNU/Linux 9 (stretch)
PDF.js version: upstream or latest stable (v1.9.426)
Is a browser extension: no

Steps to reproduce the problem:

clone the repository; run gulp generic
navigate to ./build/generic and start a http server there (reproducible on Microsoft's IIS as well)
try loading the PDF: http://localhost:8080/web/viewer.html?file=https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf

What is the expected behavior? (add screenshot)
PDF is loaded using range requests - the same way https://mozilla.github.io/pdf.js/web/viewer.html?file=https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf is loaded

That is, we first get 200 OK response with
content-length:1016315
accept-ranges:bytes
headers; and then issue two more requests, which both return with status 206
What went wrong? (add screenshot)
The entire PDF is loaded before rendering starts, no range requests used:

We do have the headers, but no subsequent requests are issued.
After debugging I noticed that the "getResponseHeader" function in fetch_stream.js returns null when called with "Accept-Ranges", causing incorrect range requests capability detection:

Same breakpoint for https://mozilla.github.io/pdf.js/web/viewer.html?file=https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf returns valid results ("bytes"):

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

Figured that out. When accessing a resource via CORS, the server has to provide a comma-separated list of headers that are allowed to be accessed in JavaScript. The list should be placed in the "Access-Control-Expose-Headers" header. In this case sending:
"Access-Control-Expose-Headers": "Accept-Ranges, Content-Length"
appeared to be enough to solve the problem.


Single Voltage Source

A voltage source that takes up a whole block.

Textures/models will be done in #165


Add istio meta prefix metadata to proxy metadata

Env like ISTIO_META_ISTIO_VERSION is not reported, which lead to ztunnel has no version displayed in istiod.

@hanxiaop: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

test_ztunnel
d8935bf58515d368bbbb05171b1aabab4eeccd98
link
true
/test test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@hanxiaop: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

test_ztunnel
09e4422ea6902078bccf301a2c0a5819fe69879f
link
true
/test test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@hanxiaop: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

test_ztunnel
e731349d74b21f4de5d61cd5a09e743ea57eba3f
link
true
/test test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@hanxiaop: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

test_ztunnel
7121f6e82b212bd6f5401f9e3f432edd266bde86
link
true
/test test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@hanxiaop: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

test_ztunnel
005c08ccf79751e85f4017074c7a878bf38de88f
link
true
/test test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


feat: improve table.summary. Catch ValueError thrown by column.stability

Closes #320
Summary of Changes
The stability of a column with only null values should just be skipped and displayed in the returned table as a minus: -

🦙 MegaLinter status: ✅ SUCCESS

Descriptor
Linter
Files
Fixed
Errors
Elapsed time

✅ PYTHON
black
2
1
0
0.87s

✅ PYTHON
mypy
2

0
1.92s

✅ PYTHON
ruff
2
1
0
0.02s

✅ REPOSITORY
git_diff
yes

no
0.0s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff
MegaLinter is graciously provided by

:tada: This PR is included in version 0.14.0 :tada:
The release is available on:

v0.14.0
GitHub release

Your semantic-release bot :package::rocket:


Server replay errors

Steps to reproduce the problem:

Use '-w' option to save to file
Use '-S' option to read file as server replay
I  am using addons, might be related?

Any other comments? What have you tried so far?
Addon error: Traceback (most recent call last):
  File "c:\users\yoni\appdata\local\programs\python\python37-32\lib\site-packages\mitmproxy\addons\serverplayback.py", line 183, in request
    response.refresh()
  File "c:\users\yoni\appdata\local\programs\python\python37-32\lib\site-packages\mitmproxy\net\http\response.py", line 178, in refresh
    delta = now - self.timestamp_start
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

The line in question:
https://github.com/mitmproxy/mitmproxy/blob/3cd37652709292cffa1bc733134cef5483489341/mitmproxy/net/http/response.py#L178
If i add "return" at the start of Response\refresh() replay is being playing back OK. (Obviously not refreshed)
System information
Mitmproxy: 4.0.4
Python:    3.7.1
OpenSSL:   OpenSSL 1.1.0i  14 Aug 2018
Platform:  Windows-10-10.0.17134-SP0

I can't reproduce this, timestamp_start really should always be set. If it isn't, please file a new issue with clear steps. :)


Separated LL functions

Seems OK for merging.

Most modules now have an "LL" submodule where low-level functions are encapsuled.
OgamlCore.Core has been renamed in OgamlCore.LL
OgamlGraphics.Internal has been renamed in OgamlGraphics.GL (not LL, to avoid name clashes)
Internal-only enumerations of Enum.t have been moved to GL.Types
Exposed enumerations of Enum.t have been moved to separated modules

Why GL? Graphics Low ? (I guess it has nothing to do with openGL).

GL for openGL, as the GL module contains all low-level bindings to openGL. LL_GL, GL_LL and other variants were a bit inconvenient. Everything is contained in one file so it can be easily renamed.

Okay, anyway, it's fine by me.


[react-i18n] Component not getting translations

Overview
This happens frequently when doing in app navigation through our app (react-router).
The first time a component is rendered it stays using the en translations and the other translations never show up on the i18n object under translations even through many re-renders of the component. The same component rendered a second time on the page does have the translations though. Navigating (in-app) and returning will render with the translations properly. Doing a page refresh usually works, but also sometimes causes this same issue. It's definitely much more noticeable when doing in-app navigation though.

Screenshot

Consuming repo
https://github.com/Shopify/parsnip
PR - https://github.com/Shopify/parsnip/pull/3143

I'm seeing this issue after updating from v0.11.2 to v1.2.3. I was using the babel plugin on v0.11.2, so that doesn't seem to be the problem.
I see that around 25-50% of the time it renders in English instead of the language set, when doing refresh or navigations within the app
cc @lemonmade

I need a specific page and reproduction steps to diagnose.

@lemonmade for parsnip, install the app, pick Esty as a platform, grab a file from the fixtures and drag it in. You'll see this behaviour through the regular app flow (run an import by continuing once the file is parsed).