[image_picker] Camera issue on Oneplus 6 – Android 10

Hi,
I'm on a Oneplus 6 mounting Android 10. In Flutter I wrote some code to open the camera and take a photo (coping the examples), however when, in the app, I push the button to open the camera, the app completely detach from the debugging. In production mode instead, it restarts like it was closed and launched again. I've searched other threads but I've only found a person with quite the same problem running on a Oneplus 7 Pro.
Hope to be helpful.
EDIT: I intend to specify that this actually is happening only on my Oneplus phone. I've tested on the emulator, Galaxy S9, Galaxy S10 and none of them actually has this problem.

Hi @glofru
Can you please provide your flutter doctor -v your flutter run --verbose and a complete reproducible minimal code sample
Thank you

Flutter doctor -v:
`[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale it-IT)
• Flutter version 1.22.0 at /Users/gianluca/Development/flutter
• Framework revision d408d302e2 (7 days ago), 2020-09-29 11:49:17 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/gianluca/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• ANDROID_HOME = /Users/gianluca/Library/Android/sdk
• 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 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 48.0.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.49.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.15.0
[✓] Connected device (2 available)
• ONEPLUS A6003 (mobile) • 367ecf20                             • android-arm64 • Android 10 (API 29)
• iPhone 11 Pro (mobile) • 2FF25DBC-A48C-4A8A-9AE9-AD0AC1649AF7 • ios           • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
• No issues found!`
About the sample code, I just created a new project and copy paste https://github.com/flutter/plugins/blob/master/packages/image_picker/image_picker/example/lib/main.dart (adding obviously image_picker and video_player to pubspec).
About the verbose run you can find it here: verbose_run.txt. I just launched the app and tried to pick an image with the camera.
I'm at your disposal.
Thank you!

Hi @glofru
I just to reproduce using the official example on Oneplus 8 running Android 10,
When taking a picture from the camera, the debugging session isn't detached, and also no issues in release mode

code sample
// Copyright 2019 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/basic.dart';
import 'package:flutter/src/widgets/container.dart';
import 'package:image_picker/image_picker.dart';
import 'package:video_player/video_player.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Image Picker Demo',
      home: MyHomePage(title: 'Image Picker Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  PickedFile _imageFile;
  dynamic _pickImageError;
  bool isVideo = false;
  VideoPlayerController _controller;
  VideoPlayerController _toBeDisposed;
  String _retrieveDataError;

  final ImagePicker _picker = ImagePicker();
  final TextEditingController maxWidthController = TextEditingController();
  final TextEditingController maxHeightController = TextEditingController();
  final TextEditingController qualityController = TextEditingController();

  Future<void> _playVideo(PickedFile file) async {
    if (file != null && mounted) {
      await _disposeVideoController();
      if (kIsWeb) {
        _controller = VideoPlayerController.network(file.path);
        // In web, most browsers won't honor a programmatic call to .play
        // if the video has a sound track (and is not muted).
        // Mute the video so it auto-plays in web!
        // This is not needed if the call to .play is the result of user
        // interaction (clicking on a "play" button, for example).
        await _controller.setVolume(0.0);
      } else {
        _controller = VideoPlayerController.file(File(file.path));
        await _controller.setVolume(1.0);
      }
      await _controller.initialize();
      await _controller.setLooping(true);
      await _controller.play();
      setState(() {});
    }
  }

  void _onImageButtonPressed(ImageSource source, {BuildContext context}) async {
    if (_controller != null) {
      await _controller.setVolume(0.0);
    }
    if (isVideo) {
      final PickedFile file = await _picker.getVideo(
          source: source, maxDuration: const Duration(seconds: 10));
      await _playVideo(file);
    } else {
      await _displayPickImageDialog(context,
          (double maxWidth, double maxHeight, int quality) async {
        try {
          final pickedFile = await _picker.getImage(
            source: source,
            maxWidth: maxWidth,
            maxHeight: maxHeight,
            imageQuality: quality,
          );
          setState(() {
            _imageFile = pickedFile;
          });
        } catch (e) {
          setState(() {
            _pickImageError = e;
          });
        }
      });
    }
  }

  @override
  void deactivate() {
    if (_controller != null) {
      _controller.setVolume(0.0);
      _controller.pause();
    }
    super.deactivate();
  }

  @override
  void dispose() {
    _disposeVideoController();
    maxWidthController.dispose();
    maxHeightController.dispose();
    qualityController.dispose();
    super.dispose();
  }

  Future<void> _disposeVideoController() async {
    if (_toBeDisposed != null) {
      await _toBeDisposed.dispose();
    }
    _toBeDisposed = _controller;
    _controller = null;
  }

  Widget _previewVideo() {
    final Text retrieveError = _getRetrieveErrorWidget();
    if (retrieveError != null) {
      return retrieveError;
    }
    if (_controller == null) {
      return const Text(
        'You have not yet picked a video',
        textAlign: TextAlign.center,
      );
    }
    return Padding(
      padding: const EdgeInsets.all(10.0),
      child: AspectRatioVideo(_controller),
    );
  }

  Widget _previewImage() {
    final Text retrieveError = _getRetrieveErrorWidget();
    if (retrieveError != null) {
      return retrieveError;
    }
    if (_imageFile != null) {
      if (kIsWeb) {
        // Why network?
        // See https://pub.dev/packages/image_picker#getting-ready-for-the-web-platform
        return Image.network(_imageFile.path);
      } else {
        return Image.file(File(_imageFile.path));
      }
    } else if (_pickImageError != null) {
      return Text(
        'Pick image error: $_pickImageError',
        textAlign: TextAlign.center,
      );
    } else {
      return const Text(
        'You have not yet picked an image.',
        textAlign: TextAlign.center,
      );
    }
  }

  Future<void> retrieveLostData() async {
    final LostData response = await _picker.getLostData();
    if (response.isEmpty) {
      return;
    }
    if (response.file != null) {
      if (response.type == RetrieveType.video) {
        isVideo = true;
        await _playVideo(response.file);
      } else {
        isVideo = false;
        setState(() {
          _imageFile = response.file;
        });
      }
    } else {
      _retrieveDataError = response.exception.code;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: !kIsWeb && defaultTargetPlatform == TargetPlatform.android
            ? FutureBuilder<void>(
                future: retrieveLostData(),
                builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
                  switch (snapshot.connectionState) {
                    case ConnectionState.none:
                    case ConnectionState.waiting:
                      return const Text(
                        'You have not yet picked an image.',
                        textAlign: TextAlign.center,
                      );
                    case ConnectionState.done:
                      return isVideo ? _previewVideo() : _previewImage();
                    default:
                      if (snapshot.hasError) {
                        return Text(
                          'Pick image/video error: ${snapshot.error}}',
                          textAlign: TextAlign.center,
                        );
                      } else {
                        return const Text(
                          'You have not yet picked an image.',
                          textAlign: TextAlign.center,
                        );
                      }
                  }
                },
              )
            : (isVideo ? _previewVideo() : _previewImage()),
      ),
      floatingActionButton: Column(
        mainAxisAlignment: MainAxisAlignment.end,
        children: <Widget>[
          FloatingActionButton(
            onPressed: () {
              isVideo = false;
              _onImageButtonPressed(ImageSource.gallery, context: context);
            },
            heroTag: 'image0',
            tooltip: 'Pick Image from gallery',
            child: const Icon(Icons.photo_library),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              onPressed: () {
                isVideo = false;
                _onImageButtonPressed(ImageSource.camera, context: context);
              },
              heroTag: 'image1',
              tooltip: 'Take a Photo',
              child: const Icon(Icons.camera_alt),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                isVideo = true;
                _onImageButtonPressed(ImageSource.gallery);
              },
              heroTag: 'video0',
              tooltip: 'Pick Video from gallery',
              child: const Icon(Icons.video_library),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                isVideo = true;
                _onImageButtonPressed(ImageSource.camera);
              },
              heroTag: 'video1',
              tooltip: 'Take a Video',
              child: const Icon(Icons.videocam),
            ),
          ),
        ],
      ),
    );
  }

  Text _getRetrieveErrorWidget() {
    if (_retrieveDataError != null) {
      final Text result = Text(_retrieveDataError);
      _retrieveDataError = null;
      return result;
    }
    return null;
  }

  Future<void> _displayPickImageDialog(
      BuildContext context, OnPickImageCallback onPick) async {
    return showDialog(
        context: context,
        builder: (context) {
          return AlertDialog(
            title: Text('Add optional parameters'),
            content: Column(
              children: <Widget>[
                TextField(
                  controller: maxWidthController,
                  keyboardType: TextInputType.numberWithOptions(decimal: true),
                  decoration:
                      InputDecoration(hintText: "Enter maxWidth if desired"),
                ),
                TextField(
                  controller: maxHeightController,
                  keyboardType: TextInputType.numberWithOptions(decimal: true),
                  decoration:
                      InputDecoration(hintText: "Enter maxHeight if desired"),
                ),
                TextField(
                  controller: qualityController,
                  keyboardType: TextInputType.number,
                  decoration:
                      InputDecoration(hintText: "Enter quality if desired"),
                ),
              ],
            ),
            actions: <Widget>[
              FlatButton(
                child: const Text('CANCEL'),
                onPressed: () {
                  Navigator.of(context).pop();
                },
              ),
              FlatButton(
                  child: const Text('PICK'),
                  onPressed: () {
                    double width = maxWidthController.text.isNotEmpty
                        ? double.parse(maxWidthController.text)
                        : null;
                    double height = maxHeightController.text.isNotEmpty
                        ? double.parse(maxHeightController.text)
                        : null;
                    int quality = qualityController.text.isNotEmpty
                        ? int.parse(qualityController.text)
                        : null;
                    onPick(width, height, quality);
                    Navigator.of(context).pop();
                  }),
            ],
          );
        });
  }
}

typedef void OnPickImageCallback(
    double maxWidth, double maxHeight, int quality);

class AspectRatioVideo extends StatefulWidget {
  AspectRatioVideo(this.controller);

  final VideoPlayerController controller;

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

class AspectRatioVideoState extends State<AspectRatioVideo> {
  VideoPlayerController get controller => widget.controller;
  bool initialized = false;

  void _onVideoControllerUpdate() {
    if (!mounted) {
      return;
    }
    if (initialized != controller.value.initialized) {
      initialized = controller.value.initialized;
      setState(() {});
    }
  }

  @override
  void initState() {
    super.initState();
    controller.addListener(_onVideoControllerUpdate);
  }

  @override
  void dispose() {
    controller.removeListener(_onVideoControllerUpdate);
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    if (initialized) {
      return Center(
        child: AspectRatio(
          aspectRatio: controller.value?.aspectRatio,
          child: VideoPlayer(controller),
        ),
      );
    } else {
      return Container();
    }
  }
}

logs
tahatesser@Tahas-MacBook-Pro stable_flutter % flutters run -d in -v
[ +134 ms] executing: [/Users/tahatesser/Code/flutter_stable/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +54 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +1 ms] d408d302e22179d598f467e11da5dd968dbdc9ec
[   +1 ms] executing: [/Users/tahatesser/Code/flutter_stable/] git tag --points-at HEAD
[  +88 ms] Exit code 0 from: git tag --points-at HEAD
[        ] 1.22.0
           1.22.0-12.3.pre
[  +10 ms] executing: [/Users/tahatesser/Code/flutter_stable/] git rev-parse --abbrev-ref --symbolic @{u}
[  +10 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Users/tahatesser/Code/flutter_stable/] git ls-remote --get-url origin
[  +13 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +53 ms] executing: [/Users/tahatesser/Code/flutter_stable/] git rev-parse --abbrev-ref HEAD
[  +11 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +6 ms] executing: sw_vers -productName
[  +13 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +13 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15.7
[        ] executing: sw_vers -buildVersion
[  +13 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19H2
[  +42 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +20 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb devices -l
[   +9 ms] executing: /usr/bin/xcode-select --print-path
[   +6 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +1 ms] executing: /usr/bin/xcodebuild -version
[ +895 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[        ] Xcode 12.0.1
           Build version 12A7300
[   +1 ms] executing: xcrun --find xcdevice
[  +10 ms] Exit code 0 from: xcrun --find xcdevice
[        ] /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice
[        ] executing: xcrun xcdevice list --timeout 2
[   +3 ms] /usr/bin/xcrun simctl list --json devices
[        ] executing: /usr/bin/xcrun simctl list --json devices
[  +37 ms] List of devices attached
           c9d8ee0c               device usb:336855040X product:OnePlus8_IND model:IN2011 device:OnePlus8 transport_id:3
[  +78 ms] {
             "devices" : {
               "com.apple.CoreSimulator.SimRuntime.tvOS-14-0" : [

               ],
               "com.apple.CoreSimulator.SimRuntime.watchOS-7-0" : [
                 {
                   "dataPath" :
                   "\/Users\/tahatesser\/Library\/Developer\/CoreSimulator\/Devices\/15BCDD2A-D1F0-4114-B61B-767E9C57DF5E\/data",
                   "logPath" : "\/Users\/tahatesser\/Library\/Logs\/CoreSimulator\/15BCDD2A-D1F0-4114-B61B-767E9C57DF5E",
                   "udid" : "15BCDD2A-D1F0-4114-B61B-767E9C57DF5E",
                   "isAvailable" : true,
                   "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm",
                   "state" : "Shutdown",
                   "name" : "Apple Watch Series 5 - 40mm"
                 },
                 {
                   "dataPath" :
                   "\/Users\/tahatesser\/Library\/Developer\/CoreSimulator\/Devices\/AA6D7DDF-CCD3-4969-864E-B4C73F3592C0\/data",
                   "logPath" : "\/Users\/tahatesser\/Library\/Logs\/CoreSimulator\/AA6D7DDF-CCD3-4969-864E-B4C73F3592C0",
                   "udid" : "AA6D7DDF-CCD3-4969-864E-B4C73F3592C0",
                   "isAvailable" : true,
                   "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm",
                   "state" : "Shutdown",
                   "name" : "Apple Watch Series 5 - 44mm"
                 }
               ],
               "com.apple.CoreSimulator.SimRuntime.iOS-14-0" : [
                 {
                   "dataPath" :
                   "\/Users\/tahatesser\/Library\/Developer\/CoreSimulator\/Devices\/AFF9AE1D-D6C7-46C4-9288-A98DB74D942B\/data",
                   "logPath" : "\/Users\/tahatesser\/Library\/Logs\/CoreSimulator\/AFF9AE1D-D6C7-46C4-9288-A98DB74D942B",
                   "udid" : "AFF9AE1D-D6C7-46C4-9288-A98DB74D942B",
                   "isAvailable" : true,
                   "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-11",
                   "state" : "Shutdown",
                   "name" : "iPhone 11"
                 }
               ]
             }
           }
[+3915 ms] [
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "7.0 (18R382)",
                        "available" : true,
                        "platform" : "com.apple.platform.watchsimulator",
                        "modelCode" : "Watch5,3",
                        "identifier" : "15BCDD2A-D1F0-4114-B61B-767E9C57DF5E",
                        "architecture" : "x86_64",
                        "modelUTI" : "com.apple.watch-series5-1",
                        "modelName" : "Apple Watch Series 5 - 40mm",
                        "name" : "Apple Watch Series 5 - 40mm"
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "7.0 (18R382)",
                        "available" : true,
                        "platform" : "com.apple.platform.watchsimulator",
                        "modelCode" : "Watch5,4",
                        "identifier" : "AA6D7DDF-CCD3-4969-864E-B4C73F3592C0",
                        "architecture" : "x86_64",
                        "modelUTI" : "com.apple.watch-series5-1",
                        "modelName" : "Apple Watch Series 5 - 44mm",
                        "name" : "Apple Watch Series 5 - 44mm"
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "14.0 (18A372)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPhone12,1",
                        "identifier" : "AFF9AE1D-D6C7-46C4-9288-A98DB74D942B",
                        "architecture" : "x86_64",
                        "modelUTI" : "com.apple.iphone-11-1",
                        "modelName" : "iPhone 11",
                        "name" : "iPhone 11"
                      }
                    ]
[   +5 ms] /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell getprop
[  +63 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +4 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +127 ms] Found plugin flutter_plugin_android_lifecycle at
/Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.11/
[  +13 ms] Found plugin image_picker at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+11/
[  +31 ms] Found plugin video_player at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player-0.11.0/
[   +4 ms] Found plugin video_player_web at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player_web-0.1.4/
[  +93 ms] Found plugin flutter_plugin_android_lifecycle at
/Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.11/
[   +4 ms] Found plugin image_picker at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+11/
[  +16 ms] Found plugin video_player at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player-0.11.0/
[   +4 ms] Found plugin video_player_web at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player_web-0.1.4/
[  +18 ms] Generating
/Users/tahatesser/AndroidStudioProjects/stable_flutter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +30 ms] ro.hardware = qcom
[  +46 ms] Starting incremental build...
[   +4 ms] Initializing file store
[  +13 ms] Skipping target: gen_localizations
[   +5 ms] complete
[   +4 ms] Launching lib/main.dart on IN2011 in debug mode...
[   +8 ms] /Users/tahatesser/Code/flutter_stable/bin/cache/dart-sdk/bin/dart --disable-dart-dev
/Users/tahatesser/Code/flutter_stable/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/tahatesser/Code/flutter_stable/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter
--debugger-module-names --experimental-emit-debug-metadata -Ddart.developer.causal_async_stacks=true --output-dill
/var/folders/zn/2h15_djs5b52vjngnsb22v6w0000gn/T/flutter_tools.2GZwFt/flutter_tool.2vLLC2/app.dill --packages .packages
-Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-ca
ll-instructions --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build/cache.dill.track.dill
[  +10 ms] executing: /Users/tahatesser/Code/sdk/build-tools/30.0.2/aapt dump xmltree
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[  +20 ms] Exit code 0 from: /Users/tahatesser/Code/sdk/build-tools/30.0.2/aapt dump xmltree
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[   +1 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
               A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
               A: package="com.example.stable_flutter" (Raw: "com.example.stable_flutter")
               A: platformBuildVersionCode=(type 0x10)0x1d
               A: platformBuildVersionName=(type 0x10)0xa
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1d
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: uses-permission (line=15)
                 A: android:name(0x01010003)="android.permission.READ_EXTERNAL_STORAGE" (Raw:
                 "android.permission.READ_EXTERNAL_STORAGE")
               E: uses-permission (line=16)
                 A: android:name(0x01010003)="android.permission.WRITE_EXTERNAL_STORAGE" (Raw:
                 "android.permission.WRITE_EXTERNAL_STORAGE")
               E: uses-permission (line=17)
                 A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw:
                 "android.permission.ACCESS_NETWORK_STATE")
               E: application (line=25)
                 A: android:label(0x01010001)="stable_flutter" (Raw: "stable_flutter")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw: "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=31)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.stable_flutter.MainActivity" (Raw:
                   "com.example.stable_flutter.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=45)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
                     "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=55)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
                     "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=59)
                     E: action (line=60)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=62)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=69)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
                 E: provider (line=73)
                   A: android:name(0x01010003)="io.flutter.plugins.imagepicker.ImagePickerFileProvider" (Raw:
                   "io.flutter.plugins.imagepicker.ImagePickerFileProvider")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:authorities(0x01010018)="com.example.stable_flutter.flutter.image_provider" (Raw:
                   "com.example.stable_flutter.flutter.image_provider")
                   A: android:grantUriPermissions(0x0101001b)=(type 0x12)0xffffffff
                   E: meta-data (line=78)
                     A: android:name(0x01010003)="android.support.FILE_PROVIDER_PATHS" (Raw: "android.support.FILE_PROVIDER_PATHS")
                     A: android:resource(0x01010025)=@0x7f0c0000
[  +14 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell -x logcat -v time -t 1
[ +165 ms] Exit code 0 from: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell -x logcat -v time -t 1
[   +1 ms] --------- beginning of main
           10-06 20:59:23.233 E/sensors-hal(  862): handle_sns_client_event:53, device_orient_event: ts=2845473180254872, type=4
[   +3 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell -x logcat -v time -t 1
[ +163 ms] Exit code 0 from: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell -x logcat -v time -t 1
[   +1 ms] --------- beginning of system
           10-06 20:59:23.428 W/NotificationService( 1574): Toast already killed. pkg=com.oneplus.screenrecord
           callback=android.app.ITransientNotification$Stub$Proxy@dfb8cf2
[  +23 ms] <- compile package:stable_flutter/main.dart
[  +10 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb version
[  +24 ms] Android Debug Bridge version 1.0.41
           Version 30.0.4-6686687
           Installed as /Users/tahatesser/Code/sdk/platform-tools/adb
[   +3 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb start-server
[  +18 ms] Building APK
[  +23 ms] Running Gradle task 'assembleDebug'...
[   +4 ms] gradle.properties already sets `android.enableR8`
[   +4 ms] Using gradle from /Users/tahatesser/AndroidStudioProjects/stable_flutter/android/gradlew.
[   +1 ms] /Users/tahatesser/AndroidStudioProjects/stable_flutter/android/gradlew mode: 33261 rwxr-xr-x.
[  +15 ms] executing: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[  +16 ms] Exit code 0 from: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[        ] {"CFBundleName":"Android
Studio","JVMOptions":{"ClassPath":"$APP_PACKAGE\/Contents\/lib\/bootstrap.jar:$APP_PACKAGE\/Contents\/lib\/extensions.jar:$APP_PACKA
GE\/Contents\/lib\/util.jar:$APP_PACKAGE\/Contents\/lib\/jdom.jar:$APP_PACKAGE\/Contents\/lib\/log4j.jar:$APP_PACKAGE\/Contents\/lib
\/trove4j.jar:$APP_PACKAGE\/Contents\/lib\/jna.jar","JVMVersion":"1.8*,1.8+","WorkingDirectory":"$APP_PACKAGE\/Contents\/bin","MainC
lass":"com.intellij.idea.Main","Properties":{"idea.paths.selector":"AndroidStudio4.0","idea.executable":"studio","idea.platform.pref
ix":"AndroidStudio","idea.home.path":"$APP_PACKAGE\/Contents"}},"NSDesktopFolderUsageDescription":"An application in Android Studio
requests access to the user's Desktop
folder.","LSArchitecturePriority":["x86_64"],"CFBundleVersion":"AI-193.69<IP_ADDRESS>26763","CFBundleDevelopmentRegion":"English","NS
CameraUsageDescription":"An application in Android Studio requests access to the device's
camera.","CFBundleDocumentTypes":[{"CFBundleTypeName":"Android Studio Project
File","CFBundleTypeExtensions":["ipr"],"CFBundleTypeRole":"Editor","CFBundleTypeIconFile":"studio.icns"},{"CFBundleTypeName":"All
documents","CFBundleTypeExtensions":["*"],"CFBundleTypeOSTypes":["****"],"CFBundleTypeRole":"Editor","LSTypeIsPackage":false}],"NSSu
pportsAutomaticGraphicsSwitching":true,"CFBundlePackageType":"APPL","CFBundleIconFile":"studio.icns","NSHighResolutionCapable":true,
"CFBundleShortVersionString":"4.0","NSMicrophoneUsageDescription":"An application in Android Studio requests access to the device's
microphone.","CFBundleInfoDictionaryVersion":"6.0","CFBundleExecutable":"studio","NSLocationUsageDescription":"An application in
Android Studio requests access to the user's location
information.","LSRequiresNativeExecution":"YES","CFBundleURLTypes":[{"CFBundleTypeRole":"Editor","CFBundleURLName":"Stacktrace","CFB
undleURLSchemes":["idea"]}],"CFBundleIdentifier":"com.google.android.studio","LSApplicationCategoryType":"public.app-category.develo
per-tools","CFBundleSignature":"????","LSMinimumSystemVersion":"10.8","NSDocumentsFolderUsageDescription":"An application in Android
Studio requests access to the user's Documents folder.","NSDownloadsFolderUsageDescription":"An application in Android Studio
requests access to the user's Downloads folder.","NSNetworkVolumesUsageDescription":"An application in Android Studio requests
access to files on a network volume.","CFBundleGetInfoString":"Android Studio 4.0, build AI-193.69<IP_ADDRESS>26763. Copyright
JetBrains s.r.o., (c) 2000-2020","NSRemovableVolumesUsageDescription":"An application in Android Studio requests access to files on
a removable volume."}
[  +14 ms] executing: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[  +89 ms] Exit code 0 from: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[        ] openjdk version "1.8.0_242-release"
           OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
           OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)
[   +2 ms] executing: [/Users/tahatesser/AndroidStudioProjects/stable_flutter/android/]
/Users/tahatesser/AndroidStudioProjects/stable_flutter/android/gradlew -Pverbose=true -Ptarget-platform=android-arm64
-Ptarget=/Users/tahatesser/AndroidStudioProjects/stable_flutter/lib/main.dart -Ptrack-widget-creation=true
-Pfilesystem-scheme=org-dartlang-root assembleDebug
[+3507 ms] > Task :app:compileFlutterBuildDebug
[   +1 ms] [ +122 ms] executing: [/Users/tahatesser/Code/flutter_stable/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +2 ms] [  +44 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [        ] d408d302e22179d598f467e11da5dd968dbdc9ec
[        ] [        ] executing: [/Users/tahatesser/Code/flutter_stable/] git tag --points-at HEAD
[        ] [  +17 ms] Exit code 0 from: git tag --points-at HEAD
[        ] [        ] 1.22.0
[        ]            1.22.0-12.3.pre
[        ] [  +12 ms] executing: [/Users/tahatesser/Code/flutter_stable/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [   +9 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/stable
[        ] [        ] executing: [/Users/tahatesser/Code/flutter_stable/] git ls-remote --get-url origin
[        ] [   +9 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +44 ms] executing: [/Users/tahatesser/Code/flutter_stable/] git rev-parse --abbrev-ref HEAD
[        ] [  +12 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] stable
[        ] [  +36 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [   +5 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[  +43 ms] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [  +79 ms] Initializing file store
[        ] [  +15 ms] Skipping target: gen_localizations
[   +1 ms] [   +6 ms] kernel_snapshot: Starting due to {}
[   +2 ms] [  +28 ms] /Users/tahatesser/Code/flutter_stable/bin/cache/dart-sdk/bin/dart --disable-dart-dev
/Users/tahatesser/Code/flutter_stable/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/tahatesser/Code/flutter_stable/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter
-Ddart.developer.causal_async_stacks=true -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-ca
ll-instructions --enable-asserts --track-widget-creation --no-link-platform --packages
/Users/tahatesser/AndroidStudioProjects/stable_flutter/.packages --output-dill
/Users/tahatesser/AndroidStudioProjects/stable_flutter/.dart_tool/flutter_build/f66035a540ac83f94fb03fa1cbda4aad/app.dill --depfile
/Users/tahatesser/AndroidStudioProjects/stable_flutter/.dart_tool/flutter_build/f66035a540ac83f94fb03fa1cbda4aad/kernel_snapshot.d
package:stable_flutter/main.dart
[+6402 ms] [+7643 ms] kernel_snapshot: Complete
[ +704 ms] [ +654 ms] debug_android_application: Starting due to {}
[ +198 ms] [ +205 ms] debug_android_application: Complete
[ +704 ms] [ +677 ms] Persisting file store
[        ] [   +6 ms] Done persisting file store
[        ] [   +7 ms] build succeeded.
[        ] [  +12 ms] "flutter assemble" took 9,354ms.
[        ] [   +3 ms] ensureAnalyticsSent: 0ms
[        ] [   +1 ms] Running shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[ +191 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[        ] > Task :app:preBuild UP-TO-DATE
[        ] > Task :app:preDebugBuild UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:preBuild UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:preDebugBuild UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:compileDebugAidl NO-SOURCE
[        ] > Task :image_picker:preBuild UP-TO-DATE
[        ] > Task :image_picker:preDebugBuild UP-TO-DATE
[        ] > Task :video_player:preBuild UP-TO-DATE
[        ] > Task :video_player:preDebugBuild UP-TO-DATE
[  +97 ms] > Task :image_picker:compileDebugAidl NO-SOURCE
[        ] > Task :flutter_plugin_android_lifecycle:packageDebugRenderscript NO-SOURCE
[        ] > Task :image_picker:packageDebugRenderscript NO-SOURCE
[        ] > Task :video_player:packageDebugRenderscript NO-SOURCE
[        ] > Task :app:checkDebugManifest UP-TO-DATE
[        ] > Task :app:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :app:compileDebugRenderscript NO-SOURCE
[        ] > Task :video_player:compileDebugAidl NO-SOURCE
[        ] > Task :app:compileDebugAidl NO-SOURCE
[        ] > Task :app:cleanMergeDebugAssets
[        ] > Task :app:mergeDebugShaders UP-TO-DATE
[        ] > Task :app:compileDebugShaders UP-TO-DATE
[        ] > Task :app:generateDebugAssets UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:mergeDebugShaders UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:compileDebugShaders UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:generateDebugAssets UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:packageDebugAssets UP-TO-DATE
[        ] > Task :image_picker:mergeDebugShaders UP-TO-DATE
[        ] > Task :image_picker:compileDebugShaders UP-TO-DATE
[        ] > Task :image_picker:generateDebugAssets UP-TO-DATE
[   +3 ms] > Task :image_picker:packageDebugAssets UP-TO-DATE
[        ] > Task :video_player:mergeDebugShaders UP-TO-DATE
[        ] > Task :video_player:compileDebugShaders UP-TO-DATE
[        ] > Task :video_player:generateDebugAssets UP-TO-DATE
[        ] > Task :video_player:packageDebugAssets UP-TO-DATE
[        ] > Task :app:mergeDebugAssets
[ +290 ms] > Task :app:copyFlutterAssetsDebug
[        ] > Task :app:mainApkListPersistenceDebug UP-TO-DATE
[        ] > Task :app:generateDebugResValues UP-TO-DATE
[        ] > Task :app:generateDebugResources UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:generateDebugResValues UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:compileDebugRenderscript NO-SOURCE
[        ] > Task :flutter_plugin_android_lifecycle:generateDebugResources UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:packageDebugResources UP-TO-DATE
[        ] > Task :image_picker:generateDebugResValues UP-TO-DATE
[        ] > Task :image_picker:compileDebugRenderscript NO-SOURCE
[        ] > Task :image_picker:generateDebugResources UP-TO-DATE
[        ] > Task :image_picker:packageDebugResources UP-TO-DATE
[        ] > Task :video_player:generateDebugResValues UP-TO-DATE
[        ] > Task :video_player:compileDebugRenderscript NO-SOURCE
[        ] > Task :video_player:generateDebugResources UP-TO-DATE
[        ] > Task :video_player:packageDebugResources UP-TO-DATE
[  +97 ms] > Task :app:mergeDebugResources UP-TO-DATE
[        ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:checkDebugManifest UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:processDebugManifest UP-TO-DATE
[        ] > Task :image_picker:checkDebugManifest UP-TO-DATE
[        ] > Task :image_picker:processDebugManifest UP-TO-DATE
[        ] > Task :video_player:checkDebugManifest UP-TO-DATE
[        ] > Task :video_player:processDebugManifest UP-TO-DATE
[        ] > Task :app:processDebugManifest UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:parseDebugLibraryResources UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:generateDebugRFile UP-TO-DATE
[        ] > Task :image_picker:parseDebugLibraryResources UP-TO-DATE
[        ] > Task :image_picker:generateDebugRFile UP-TO-DATE
[        ] > Task :video_player:parseDebugLibraryResources UP-TO-DATE
[        ] > Task :video_player:generateDebugRFile UP-TO-DATE
[        ] > Task :app:processDebugResources UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:javaPreCompileDebug UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:compileDebugJavaWithJavac UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:bundleLibCompileDebug UP-TO-DATE
[        ] > Task :image_picker:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :image_picker:javaPreCompileDebug UP-TO-DATE
[        ] > Task :image_picker:compileDebugJavaWithJavac UP-TO-DATE
[        ] > Task :image_picker:bundleLibCompileDebug UP-TO-DATE
[        ] > Task :video_player:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :video_player:javaPreCompileDebug UP-TO-DATE
[  +98 ms] > Task :video_player:compileDebugJavaWithJavac UP-TO-DATE
[        ] > Task :video_player:bundleLibCompileDebug UP-TO-DATE
[        ] > Task :app:compileDebugKotlin UP-TO-DATE
[        ] > Task :app:javaPreCompileDebug UP-TO-DATE
[        ] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[        ] > Task :app:compileDebugSources UP-TO-DATE
[        ] > Task :app:processDebugJavaRes NO-SOURCE
[        ] > Task :flutter_plugin_android_lifecycle:processDebugJavaRes NO-SOURCE
[        ] > Task :flutter_plugin_android_lifecycle:bundleLibResDebug UP-TO-DATE
[        ] > Task :image_picker:processDebugJavaRes NO-SOURCE
[        ] > Task :image_picker:bundleLibResDebug UP-TO-DATE
[        ] > Task :video_player:processDebugJavaRes NO-SOURCE
[        ] > Task :video_player:bundleLibResDebug UP-TO-DATE
[        ] > Task :app:mergeDebugJavaResource UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:bundleLibRuntimeDebug UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:createFullJarDebug UP-TO-DATE
[        ] > Task :image_picker:bundleLibRuntimeDebug UP-TO-DATE
[        ] > Task :image_picker:createFullJarDebug UP-TO-DATE
[        ] > Task :video_player:bundleLibRuntimeDebug UP-TO-DATE
[        ] > Task :video_player:createFullJarDebug UP-TO-DATE
[        ] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
[        ] > Task :app:desugarDebugFileDependencies UP-TO-DATE
[        ] > Task :app:mergeExtDexDebug UP-TO-DATE
[   +3 ms] > Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
[        ] > Task :app:mergeDexDebug UP-TO-DATE
[        ] > Task :app:validateSigningDebug UP-TO-DATE
[        ] > Task :app:signingConfigWriterDebug UP-TO-DATE
[        ] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:mergeDebugJniLibFolders UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:mergeDebugNativeLibs UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:stripDebugDebugSymbols UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
[        ] > Task :image_picker:mergeDebugJniLibFolders UP-TO-DATE
[        ] > Task :image_picker:mergeDebugNativeLibs UP-TO-DATE
[        ] > Task :image_picker:stripDebugDebugSymbols UP-TO-DATE
[        ] > Task :image_picker:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
[        ] > Task :video_player:mergeDebugJniLibFolders UP-TO-DATE
[        ] > Task :video_player:mergeDebugNativeLibs UP-TO-DATE
[        ] > Task :video_player:stripDebugDebugSymbols UP-TO-DATE
[        ] > Task :video_player:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
[        ] > Task :app:mergeDebugNativeLibs UP-TO-DATE
[  +91 ms] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[        ] Compatible side by side NDK version was not found.
[+1497 ms] > Task :app:packageDebug
[ +100 ms] > Task :app:assembleDebug
[        ] > Task :flutter_plugin_android_lifecycle:extractDebugAnnotations UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:mergeDebugGeneratedProguardFiles UP-TO-DATE
[   +1 ms] > Task :flutter_plugin_android_lifecycle:mergeDebugConsumerProguardFiles UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:prepareLintJarForPublish UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:mergeDebugJavaResource UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:bundleDebugAar UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:compileDebugSources UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:assembleDebug UP-TO-DATE
[        ] > Task :image_picker:extractDebugAnnotations UP-TO-DATE
[        ] > Task :image_picker:mergeDebugGeneratedProguardFiles UP-TO-DATE
[        ] > Task :image_picker:mergeDebugConsumerProguardFiles UP-TO-DATE
[        ] > Task :image_picker:prepareLintJarForPublish UP-TO-DATE
[        ] > Task :image_picker:mergeDebugJavaResource UP-TO-DATE
[        ] > Task :image_picker:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
[        ] > Task :image_picker:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[        ] > Task :image_picker:bundleDebugAar UP-TO-DATE
[   +4 ms] > Task :image_picker:compileDebugSources UP-TO-DATE
[        ] > Task :image_picker:assembleDebug UP-TO-DATE
[        ] > Task :video_player:extractDebugAnnotations UP-TO-DATE
[        ] > Task :video_player:mergeDebugGeneratedProguardFiles UP-TO-DATE
[        ] > Task :video_player:mergeDebugConsumerProguardFiles UP-TO-DATE
[        ] > Task :video_player:prepareLintJarForPublish UP-TO-DATE
[        ] > Task :video_player:mergeDebugJavaResource UP-TO-DATE
[        ] > Task :video_player:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
[        ] > Task :video_player:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[        ] > Task :video_player:bundleDebugAar UP-TO-DATE
[        ] > Task :video_player:compileDebugSources UP-TO-DATE
[        ] > Task :video_player:assembleDebug UP-TO-DATE
[        ] BUILD SUCCESSFUL in 13s
[        ] 115 actionable tasks: 6 executed, 109 up-to-date
[ +428 ms] Running Gradle task 'assembleDebug'... (completed in 14.7s)
[  +46 ms] calculateSha: LocalDirectory:
'/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/app/outputs/flutter-apk'/app.apk
[  +31 ms] calculateSha: reading file took 30us
[ +592 ms] calculateSha: computing sha took 591us
[   +4 ms] ✓ Built build/app/outputs/flutter-apk/app-debug.apk.
[   +6 ms] executing: /Users/tahatesser/Code/sdk/build-tools/30.0.2/aapt dump xmltree
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[  +10 ms] Exit code 0 from: /Users/tahatesser/Code/sdk/build-tools/30.0.2/aapt dump xmltree
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[   +1 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
               A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
               A: package="com.example.stable_flutter" (Raw: "com.example.stable_flutter")
               A: platformBuildVersionCode=(type 0x10)0x1d
               A: platformBuildVersionName=(type 0x10)0xa
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1d
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: uses-permission (line=15)
                 A: android:name(0x01010003)="android.permission.READ_EXTERNAL_STORAGE" (Raw:
                 "android.permission.READ_EXTERNAL_STORAGE")
               E: uses-permission (line=16)
                 A: android:name(0x01010003)="android.permission.WRITE_EXTERNAL_STORAGE" (Raw:
                 "android.permission.WRITE_EXTERNAL_STORAGE")
               E: uses-permission (line=17)
                 A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw:
                 "android.permission.ACCESS_NETWORK_STATE")
               E: application (line=25)
                 A: android:label(0x01010001)="stable_flutter" (Raw: "stable_flutter")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw: "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=31)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.stable_flutter.MainActivity" (Raw:
                   "com.example.stable_flutter.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=45)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
                     "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=55)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
                     "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=59)
                     E: action (line=60)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=62)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=69)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
                 E: provider (line=73)
                   A: android:name(0x01010003)="io.flutter.plugins.imagepicker.ImagePickerFileProvider" (Raw:
                   "io.flutter.plugins.imagepicker.ImagePickerFileProvider")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:authorities(0x01010018)="com.example.stable_flutter.flutter.image_provider" (Raw:
                   "com.example.stable_flutter.flutter.image_provider")
                   A: android:grantUriPermissions(0x0101001b)=(type 0x12)0xffffffff
                   E: meta-data (line=78)
                     A: android:name(0x01010003)="android.support.FILE_PROVIDER_PATHS" (Raw: "android.support.FILE_PROVIDER_PATHS")
                     A: android:resource(0x01010025)=@0x7f0c0000
[   +8 ms] Stopping app 'app.apk' on IN2011.
[   +1 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell am force-stop com.example.stable_flutter
[ +106 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell pm list packages com.example.stable_flutter
[  +73 ms] package:com.example.stable_flutter
[   +2 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell cat
/data/local/tmp/sky.com.example.stable_flutter.sha1
[  +51 ms] 201094f72cdca0e7a0ac4728a7202cb286f0b889
[   +1 ms] Installing APK.
[   +2 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb version
[   +8 ms] Android Debug Bridge version 1.0.41
           Version 30.0.4-6686687
           Installed as /Users/tahatesser/Code/sdk/platform-tools/adb
[        ] executing: /Users/tahatesser/Code/sdk/platform-tools/adb start-server
[   +7 ms] Installing build/app/outputs/flutter-apk/app.apk...
[        ] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c install -t -r
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/app/outputs/flutter-apk/app.apk
[+3510 ms] Performing Streamed Install
                    Success
[   +1 ms] Installing build/app/outputs/flutter-apk/app.apk... (completed in 3.5s)
[   +3 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell echo -n
ea7e1b2f6731c7f7dc93fab27214023af8cd6b61 > /data/local/tmp/sky.com.example.stable_flutter.sha1
[  +22 ms] IN2011 startApp
[   +5 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c shell am start -a android.intent.action.RUN -f
0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez
verify-entry-points true com.example.stable_flutter/com.example.stable_flutter.MainActivity
[  +52 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.stable_flutter/.MainActivity (has extras)
}
[        ] Waiting for observatory port to be available...
[ +862 ms] Observatory URL on device: http://<IP_ADDRESS>:40393/4cQWXvYiHg0=/
[   +2 ms] executing: /Users/tahatesser/Code/sdk/platform-tools/adb -s c9d8ee0c forward tcp:0 tcp:40393
[  +11 ms] 51228
[   +1 ms] Forwarded host port 51228 to device port 40393 for Observatory
[   +7 ms] Caching compiled dill
[  +51 ms] Connecting to service protocol: http://<IP_ADDRESS>:51228/4cQWXvYiHg0=/
[   +1 ms] DDS is currently disabled due to https://github.com/flutter/flutter/issues/62507
[ +161 ms] Successfully connected to service protocol: http://<IP_ADDRESS>:51228/4cQWXvYiHg0=/
[        ] Waiting for IN2011 to report its views...
[   +6 ms] Waiting for IN2011 to report its views... (completed in 4ms)
[   +8 ms] DevFS: Creating new filesystem on the device (null)
[  +13 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/com.example.stable_flutter/code_cache/stable_flutterEPFTJP/stable_flutter/)
[   +1 ms] Updating assets
[  +86 ms] Syncing files to device IN2011...
[   +1 ms] Scanning asset files
[   +2 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] <- recompile package:stable_flutter/main.dart d40bfffe-0cc9-471f-960d-43c475bf8499
[        ] <- d40bfffe-0cc9-471f-960d-43c475bf8499
[  +82 ms] Updating files
[  +85 ms] DevFS: Sync finished
[   +1 ms] Syncing files to device IN2011... (completed in 174ms)
[   +1 ms] Synced 1.8MB.
[   +1 ms] <- accept
[   +3 ms] Connected to _flutterView/0x7e730a6020.
[   +2 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 IN2011 is available at: http://<IP_ADDRESS>:51228/4cQWXvYiHg0=/
[+9995 ms] D/ViewRootImpl[MainActivity](10589): windowFocusChanged hasFocus=false inTouchMode=true
[+53236 ms] D/OpScreenModeManager(10589): setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{2a3bdeb V.E......
........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
[  +29 ms] E/VpsExtension(10589): Failed to get binder for service "vendor.vpsservice"
[   +7 ms] E/VpsExtension(10589): Failed to get binder for service "vendor.vpsservice"
[  +77 ms] D/OpScreenModeManager(10589): setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{2a3bdeb V.E......
........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
[  +97 ms] D/OnePlusJankManager(10589):  Chor uploadMDM JANK_TYPE_ONCE mViewTitle =
com.example.stable_flutter/com.example.stable_flutter.MainActivity--- jank level = 1
[   +1 ms] D/OpScreenModeManager(10589): setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{2a3bdeb V.E......
........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
[ +120 ms] D/DecorView(10589): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@257a748[MainActivity]
[        ] D/ViewRootImpl[MainActivity](10589): windowFocusChanged hasFocus=true inTouchMode=true
[+1654 ms] D/ViewRootImpl[MainActivity](10589): windowFocusChanged hasFocus=false inTouchMode=true
[+4829 ms] D/DecorView(10589): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@257a748[MainActivity]
[   +1 ms] D/ViewRootImpl[MainActivity](10589): windowFocusChanged hasFocus=true inTouchMode=true
[   +1 ms] E/VpsExtension(10589): Failed to get binder for service "vendor.vpsservice"
[   +4 ms] E/VpsExtension(10589): Failed to get binder for service "vendor.vpsservice"
[        ] D/OpScreenModeManager(10589): setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{2a3bdeb V.E......
........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
[  +11 ms] D/OpScreenModeManager(10589): setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{2a3bdeb V.E......
........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
[  +31 ms] D/OpScreenModeManager(10589): setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{2a3bdeb V.E......
........ 0,0-1080,2342} viewRate 1 width 1080 height 2342

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-GB)
    • Flutter version 1.22.0 at /Users/tahatesser/Code/flutter_stable
    • Framework revision d408d302e2 (7 days ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • 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-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.10.0.rc.1

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

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

[✓] Connected device (1 available)
    • IN2011 (mobile) • c9d8ee0c • android-arm64 • Android 10 (API 29)

• No issues found!

Can you please run the app from the android studio, provide crashing logcat logs
Thank you

2020-10-06 19:14:04.606 4611-4611/? D/TouchInteractionService: onInputEvent# ev: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=814.0, y[0]=2134.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=798987035, downTime=798987035, deviceId=6, source=0x1002, displayId=0 }
2020-10-06 19:14:04.665 4611-4611/? I/Surface: opservice is null false
2020-10-06 19:14:04.666 923-1283/? I/SurfaceFlinger: surface flinger receiver command 20001 .....
2020-10-06 19:14:04.714 1310-4269/? D/OemSceneCallBlock: isCallBlockedWithUidIntent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.oneplus.camera/.OPCameraServiceActivity clip={text/uri-list U:content://com.example.picker_problem.flutter.image_provider/external_files/Android/data/com.example.picker_problem/files/Pictures/80cd8906-08cd-499a-858e-f69bb917c9b52299910911036555174.jpg} (has extras) }, ResolveInfo{c7f7a39 com.oneplus.camera/.OPCameraServiceActivity m=0x108000}, false
2020-10-06 19:14:04.716 1310-4269/? I/ActivityTaskManager: START u0 {act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.oneplus.camera/.OPCameraServiceActivity clip={text/uri-list U:content://com.example.picker_problem.flutter.image_provider/external_files/Android/data/com.example.picker_problem/files/Pictures/80cd8906-08cd-499a-858e-f69bb917c9b52299910911036555174.jpg} (has extras)} from uid 10676 pid 16224
2020-10-06 19:14:04.753 1310-4269/? V/ActivityTaskManager: GestureButton: skip computeBounds for this=ActivityRecord{8bc6e2c u0 com.oneplus.camera/.OPCameraServiceActivity t17977} maxAspectRatio=0.0
2020-10-06 19:14:04.755 1310-4269/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger
2020-10-06 19:14:04.755 1310-1453/? D/gwy: OS Event: appuse
2020-10-06 19:14:04.759 1310-1402/? D/OpPowerConsumpStatsInjector: notifyPkgEvent
2020-10-06 19:14:04.759 1310-1402/? D/OpRestartProcessManager: updateSelf :  com.oneplus.camera, size : 30
**2020-10-06 19:14:04.764 1310-1403/? E/system_server: Invalid ID 0x00000000.**
2020-10-06 19:14:04.775 1310-1310/? D/xne: Event success
2020-10-06 19:14:04.789 727-727/? D/Zygote: Forked child process 17679
2020-10-06 19:14:04.795 1310-1418/? I/ActivityManager: Start proc 17679:com.oneplus.camera/u0a26 for activity {com.oneplus.camera/com.oneplus.camera.OPCameraServiceActivity}
**2020-10-06 19:14:04.797 17679-17679/? E/.oneplus.camer: Not starting debugger since process cannot load the jdwp agent.**
2020-10-06 19:14:04.807 1310-4269/? D/OnePlusSmartBoostManager: writeHotCount com.oneplus.camera, pid=17679
**2020-10-06 19:14:04.808 1310-1445/? E/OPPerf: Exception : file not exits :/proc/17679/main_boost_switch
2020-10-06 19:14:04.808 1310-1445/? E/OPPerf: Exception : file not exits :/proc/1310/main_boost_switch
2020-10-06 19:14:04.808 2201-17697/? E/ANDR-RAMBOOST_SERVER: ramboost cmd_len = 68 cmd: iop_start -1** com.oneplus.camera /system/priv-app/OnePlusCamera false
2020-10-06 19:14:04.803 2201-2201/? W/start_playback_: type=1400 audit(0.0:535503): avc: denied { lock } for path="/data/system/ramboost-prefetcher.db" dev="sda17" ino=1442279 scontext=u:r:installd:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0
**2020-10-06 19:14:04.811 2201-17699/? E/ANDR-RAMBOOST_SERVER: ramboost cmd_len = 71 cmd: iop_start 17679 com.oneplus.camera /system/priv-app/OnePlusCamera false**
2020-10-06 19:14:04.812 1310-4269/? D/OemSceneModeActivityStack: [scene] evaluateGameModes :  gameMsg.arg1=0 gameMsg.arg2=1
2020-10-06 19:14:04.813 1310-4269/? D/OpQuickReply: setQuickReplyResumed focusedApp AppWindowToken{343be8a token=Token{3d480f5 ActivityRecord{8bc6e2c u0 com.oneplus.camera/.OPCameraServiceActivity t17977}}} pkgName com.oneplus.camera
2020-10-06 19:14:04.803 2201-2201/? W/iop_capture_thr: type=1400 audit(0.0:535505): avc: denied { lock } for path="/data/system/ramboost-prefetcher.db" dev="sda17" ino=1442279 scontext=u:r:installd:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0
2020-10-06 19:14:04.821 1310-1402/? D/Foreground_io: TOP_APP is ProcessRecord{a25cfb 17679:com.oneplus.camera/u0a26} uid is 10026
2020-10-06 19:14:04.822 1310-17702/? D/Foreground_io: Setting fg uid
2020-10-06 19:14:04.822 1310-17702/? D/Foreground_io: Done
2020-10-06 19:14:04.803 2201-2201/? I/chatty: uid=0(root) Binder:2201_2 identical 1 line
2020-10-06 19:14:04.803 2201-2201/? W/iop_capture_thr: type=1400 audit(0.0:535507): avc: denied { lock } for path="/data/system/ramboost-prefetcher.db" dev="sda17" ino=1442279 scontext=u:r:installd:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0
2020-10-06 19:14:04.824 17679-17679/? D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.base-V1.0-java.jar
2020-10-06 19:14:04.824 17679-17679/? D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
2020-10-06 19:14:04.824 17679-17679/? D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.base-V1.0-java.jar
2020-10-06 19:14:04.827 1310-1402/? D/OpPowerConsumpStatsInjector: notifyPkgEvent

That's the log when the actual problem happens. In bold you can find the lines printed red by Android Studio. I hope they're enough, otherwise I'll send you more.

no Issues in my logcat when running on Oneplus 8 Android 10

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.0, on Linux, locale en_US.UTF-8)
    • Flutter version 1.22.0 at /home/tahatesser/Code/flutter_stable
    • Framework revision d408d302e2 (8 days ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /home/tahatesser/Code/sdk
    • Java binary at: /home/tahatesser/Code/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Android Studio (version 4.0)
    • Android Studio at /home/tahatesser/Code/android-studio
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.3)
    • VS Code at /usr/share/code
    • Flutter extension version 3.15.0

[✓] Connected device (1 available)
    • IN2011 (mobile) • c9d8ee0c • android-arm64 • Android 10 (API 29)

• No issues found!

2020-10-07 13:06:20.226 23301-23301/com.example.stable_flutter D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{f3b4d3a V.E...... ........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
2020-10-07 13:06:20.245 23301-23301/com.example.stable_flutter E/VpsExtension: Failed to get binder for service "vendor.vpsservice"
2020-10-07 13:06:20.247 23301-23301/com.example.stable_flutter E/VpsExtension: Failed to get binder for service "vendor.vpsservice"
2020-10-07 13:06:20.258 23301-23301/com.example.stable_flutter D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{f3b4d3a V.E...... ........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
2020-10-07 13:06:20.305 23301-23301/com.example.stable_flutter D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{f3b4d3a V.E...... ........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
2020-10-07 13:06:20.528 23301-24324/com.example.stable_flutter D/DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@fe1b31d[MainActivity]
2020-10-07 13:06:20.533 23301-24324/com.example.stable_flutter D/ViewRootImpl[MainActivity]: windowFocusChanged hasFocus=true inTouchMode=true
2020-10-07 13:06:22.034 23301-24324/com.example.stable_flutter D/ViewRootImpl[MainActivity]: windowFocusChanged hasFocus=false inTouchMode=true
2020-10-07 13:06:25.702 23301-24327/com.example.stable_flutter D/DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@fe1b31d[MainActivity]
2020-10-07 13:06:25.704 23301-24327/com.example.stable_flutter D/ViewRootImpl[MainActivity]: windowFocusChanged hasFocus=true inTouchMode=true
2020-10-07 13:06:25.705 23301-23301/com.example.stable_flutter E/VpsExtension: Failed to get binder for service "vendor.vpsservice"
2020-10-07 13:06:25.707 23301-23301/com.example.stable_flutter E/VpsExtension: Failed to get binder for service "vendor.vpsservice"
2020-10-07 13:06:25.710 23301-23301/com.example.stable_flutter D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{f3b4d3a V.E...... ........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
2020-10-07 13:06:25.711 23301-23301/com.example.stable_flutter D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{f3b4d3a V.E...... ........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
2020-10-07 13:06:25.754 23301-23301/com.example.stable_flutter D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{f3b4d3a V.E...... ........ 0,0-1080,2342} viewRate 1 width 1080 height 2342
2020-10-07 13:06:56.211 23301-24327/com.example.stable_flutter D/ViewRootImpl[MainActivity]: windowFocusChanged hasFocus=false inTouchMode=true
2020-10-07 13:07:01.060 23301-23301/com.example.stable_flutter D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{f3b4d3a V.E...... ........ 0,0-1080,2342} viewRate 1 width 1080 height 2342

I'm seeing the same issue on my OnePlus 6t.
Here is an error I see in logcat that it can't access the file:
OPCameraServiceActivity: onMediaFileSaved() - capture is not completed yet, kept metadata for later use. ImageUtils: decodeOrientation() - Fail to access file /external_files/Android/data/nl.packagename/files/Pictures/4d87f18b-dfb6-453a-81d9-5948917145e04216344426073174716.jpg ImageUtils: java.io.FileNotFoundException: /external_files/Android/data/nl.<packagename>/files/Pictures/4d87f18b-dfb6-453a-81d9-5948917145e04216344426073174716.jpg: open failed: ENOENT (No such file or directory) ImageUtils: 	at libcore.io.IoBridge.open(IoBridge.java:496) ImageUtils: 	at java.io.FileInputStream.<init>(FileInputStream.java:159) ImageUtils: 	at java.io.FileInputStream.<init>(FileInputStream.java:115) ImageUtils: 	at com.oneplus.media.ImageUtils.decodeOrientation(ImageUtils.java:1667) ImageUtils: 	at com.oneplus.camera.io.PhotoSaveTask.onPrepareMediaStoreValues(PhotoSaveTask.java:567) ImageUtils: 	at com.oneplus.camera.io.MediaSaveTask.insertToMediaStore(MediaSaveTask.java:260) ImageUtils: 	at com.oneplus.camera.io.PhotoSaveTask.insertToMediaStore(PhotoSaveTask.java:367) ImageUtils: 	at com.oneplus.camera.io.FileManagerImpl$FileManageerThread$1.handleMessage(FileManagerImpl.java:515) ImageUtils: 	at android.os.Handler.dispatchMessage(Handler.java:107) ImageUtils: 	at android.os.Looper.loop(Looper.java:214) ImageUtils: 	at android.os.HandlerThread.run(HandlerThread.java:67) ImageUtils: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) ImageUtils: 	at libcore.io.Linux.open(Native Method) ImageUtils: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167) ImageUtils: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252) ImageUtils: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167) ImageUtils: 	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7581) ImageUtils: 	at libcore.io.IoBridge.open(IoBridge.java:482) ImageUtils: 	... 10 more RequestedPhotoSaveTask: insertToMediaStore() - Content URI : content://nl.<packagename>.flutter.image_provider/external_files/Android/data/nl.<packagename>/files/Pictures/4d87f18b-dfb6-453a-81d9-5948917145e04216344426073174716.jpg MediaListManager: checkContentThread() - Start content thread MediaListManager: checkContentThread() - Content thread started MediaListManager: addMedia() - No context ReviewScreenImpl: EVENT_MEDIA_SAVED - Current handle: Capture [84339656], handle in media: Capture [84339656]

Any news?

Solved the problem. Thank you.

@glofru is it fixed with a new build or dit you solve it yourself?

Solved the problem. Thank you.

how to fixed it??

@glofru can you please elaborate on the fix, for others to understand? I am seeing a similar problem with Failed to get binder for service "vendor.vpsservice" in the logs.

Solved the problem. Thank you.

@glofru could you please explain how to solve this problem? We would really appreciate your help here.

Sorry for the delay in answering but I covered a total different part and I did not see you messages.
The problem fixed on itself but there is something strange that I am noting now, that is that sometimes camera package works and sometimes no. So actually the problem is not totally solved, I was too hasty to close it.
Definitely I cannot understand why, but sometimes it works and others does not.


Upgrade yapb for zombie mod

I use yapb on Cs 1.6 Biohazard mod and have few problems.Zombies attack humans only when they are on clear area/ground.For example if I climb leader and stay on the top,zombie bots don't attack me.They just walk around and watch me but never attack.Also if I climb on any object bots don't attack.Waypoint is fine.Also bots have problem with leather climbing.
Waypoints are just fine.

Hi some wapoints after conversion do not work well after converting from ebot to yapb or from sypb to yapb try installing this version of yapb
Latest version

Hello.
Already try that version and the same problem is present.
I thing we need to force zombie bots to attack humans without thinking,just rush forward and attack with knife.

I manage to make wp for stairs.But zombies never climb on ladder.

@Krtola84 Hi check wapoints for errors and if you have a local server I recommend also using sypb bots they are similar to yapb and based on the 2.7.2 yapb source code

@Krtola84 If you want, you can send me a wp with a bot ladder problem where bots are not climbing

I use it for my online Linux server,so I can't use sypb.
How to delete all waypoint at once,for example for map de_dust2?

It happened on every map with ladder.

@Krtola84 hi you need disable autodownload graph
Leave the yb_graph_url value empty to disable graph file autoloading, and to disable graph autogeneration, change the value of the yb_graph_analyze_auto_start quar to 0 in yapb.cfg
You can enter these quars in the game or server console, then enter the yb cvars save command to save the changes in yapb.cfg.
This is can help you and after you can delete waypoints
Special thanks to @Vladislav4KZ for helping to disable graph autodownload and disable graph autocreate

Try to find out the values of the last waypoints id number at the place where the bots don't climb the ladder
Here is an example
map zm_forested waypoint ID 409 bots do not climb the ladder yb_debug_goal 409
Don't forget to writte yb_debug 1 to see whats happened if a one bots try to come 409 wp id

Thank you.I will try that.Will be back here after testing.

I fail to debug just don't understand how.
Is it possible to force CT or ts players to go at the specofic place,for example bridge on ce_assault map,and to stay ther

@Krtola84 Hi yes you can, for this you need to enter first yb_debug_goal ID Waypoint what bots need to go.
After that, you need to enter yb_debug 1 for activate yb_debug_goal with ID number, if bots still not going to ID waypoints try to disable yb_debug 0 and writte yb_debug 1 and after writte yb_debug_goal with ID number then bots will to go on ID number waypoints

How to know wp I'd number?

@Krtola84 hi you see

Node 223 if you stay at the waypoint(node) you will see ID number if you writte yb_debug 1 and writte yb_debug_goal 223 then all bots will to going on waypoint 223

Thank you. That didn't work for me.

@Krtola84 you mean not work debug and debug_goal is not working for you?

I did everything you say but bots didn't go where I want them to go

@Krtola84 Hi try to add a one bot and writte yb_debug 1 after writte yb_debug_goal with ID number waypoint when bot needs to go and if bot lost connection or can't to go on waypoint with number try to writte yb_debug_goal -1 to disable and after that try to found other waypoints around maybe this is can help you.

I tested the latest version of yapb bots with 30 think fps bots walk normally and attack and climb the ladder on small maps, I think if you created the waypoints with the support and help of auto-generation of waypoints, the waypoint ladder is located incorrectly on the ladder itself, maybe the waypoint is located outside and bots can not climb the ladder.

@Krtola84 whats the map have a problem with bots and you create waypoints byself I mean manualy without autocreate waypoints?

Ok I will try that.I use assault for testing,but that happens on every map.But,this happens on zombie mod im not sure for other mods.

Biohazard mod

I'm sure the problem is because zombie bots have only knife.And because humans has more powerful weapons than the zombies,zombies bots play defensive and try to avoid enemy.

I managed to do this but on windows version yapb.On specific node will go only players near that node.Is there a way to force all players to go whatever there distance are?

@Krtola84 can you test yapb on zombie plague and tell me please bots using ladder? And I also read source code on yapb there have creatures(zombies) and zombie will hunting on humans only if health more 100

More HP didn't change anything.Just tested.Zombie bots attack only when humans are on the ground and close each other.

Does in that source code say what bots to do if he have only knife ?

@Krtola84 Hi I think it's not problem if zombie bots have knifes and also I test the map I try research the problem can you use my waypoints map zm_tehina.graph can you test the biggest map there haven't ladder but if you will be on the roof on the church then zombie bots will be not hunting humans if they have big distance, Or can you also add me in discord Mysticpawn#2073 I will try to help you to found mistakes I think the bots if they are zombie and they do not try to climb on any biggest object, I'm sorry I haven't zombie mod biohazard for test it.

@Krtola84 I tested zm_dust2_final map with zombie plague and humans and zombies are works good zombie hunting to human and humans attack zombies and also yapb bots climb on ladder but I think this is map zm_dust2_final are just ground map without the biggest objects I mean roofs or houses

@Krtola84 don't forget to download this waypoints cs_sigma_assault because older waypoint have bugs and when bots try to climb to ladder there after when bots climb there none connections of any waypoints, bots just stay on the ladder and also I added some jumps and bots can climb to any hidden spot for zombie biohazard. Don't forget to writte me on discord and special thanks for uploading update waypoint by @Vladislav4KZ

New wp you give me is fine. But now I have new problem.I noticed that bots don't attack when they are on ladder.
https://youtube.com/shorts/dSwZZP76XxQ?si=Cr0HFSKJE27gP3n8

@Krtola84 maybe this can help you try use this commands yb_stab_close_enemies "1" and yb_has_team_semiclip "1" and yb_random_knife_attacks "1" add on yapb.cfg

Cvars Is already set like you suggest

Maybe this is the problem
// Enables or disables bot ability to stab the enemy with knife if bot is in good condition.
// ---
// Default: "1", Min: "0", Max: "1"
//
yb_stab_close_enemies "1"


Entity extraction with Snorkel

Hi,
I'm trying to implement an example of entity extraction with Snorkel. So far, I have not found any example of entity extraction without relations. Is there a complete example for this case?
Anyway, I have followed analogous steps to the examples implemented in snorkel/tutorials/intro (relation examples). However, I have several doubts, in particular, about the definition of the class, the creation of the gold_labels and the training of the discriminative model:

I have implemented the following Candidate:
Person = candidate_subclass ('Person', ['person1'])
Is the correct form for this case?

About the gold_labels (.tsv file):
a) The structure followed for this case is <document name>::span:<login>:<end of session><tab><label>
Is it correct?
b) For mapping BRAT Annotations to Snorkel Candidates (previous format), I have not found a function similar to map_annotations implemented in the BratAnnotator class for this case (extraction of an entity without relationships). Is there an analogous function for this case?

Training of the discriminative model:
In the script snorkel/tutorials/intro/Intro_Tutorial_3.ipynb to train the discriminative model you apply
the following code:

     lstm = reRNN (seed = 1701, n_threads = None)
     lstm.train (train_cands, train_marginals, X_dev = dev_cands, Y_dev = L_gold_dev, ** train_kwargs)

However, reRNN is for relations. Is there any implementation analogous to extract entities without
relations?
Thanks,
Rocío

Hi @raznargimeno,
There are currently no standalone tutorials for doing entity extraction with Snorkel.

This is correct.
a) The gold label format is rather ad hoc and depends on use case.
b) This is no equivalent function for importing entity-only annotations in BRAT. This is actually an easy change if you wanted to modify the BRATAnnotator code to support this.
There is a TagRNN implementation you can try as well.

Hope this helps.

Thank you very much for your help @jason-fries ! I will continue working on that direction.

@raznargimeno @jason-fries could either of you put together a few words about how to go about NER with Snorkel to make up for the lack of standalone tutorial for doing entity extraction with Snorkel ?
Would be extremely useful :)

Hi @vlordier I believe @jason-fries has a publication in the works!  Closing this for now, feel free to re-open


Please suport a comand line option "--version" for analyzeHeadless

Please provide a "--version" command line option for analyzeHeadless.   At present I have to run a very simple script that asks the API for the version.  It would be handy to have this more readily available.

What is your use case?  If you need access to the version # from a script you are writing, you could pretty easily get the version of Ghidra from Ghidra/application.properties.

This is for a script and supporting integration across changing versions -- your suggestion will work, as long as the existence of Ghidra/application.properties is stable.  Thank you.

It is stable...you can count on it being there.


add dotenv, common database URL

adding a render common render database; url found in personal .env


Add data.rc undefined to response condition check

With the addition of the new SMP v2 protocol the legacy SMP(v1) also had it's response data changed. Previously, the response data would allways include the rc field, see https://docs.zephyrproject.org/3.4.0/services/device_mgmt/smp_protocol.html
e.g.:
{rc: 0 , off: 73}
{rc: 0 , off: 192}
{rc: 0 , off: 311}

Now, with latest releases, the rc field only appears if non-zero (error condition), see https://docs.zephyrproject.org/3.5.0/services/device_mgmt/smp_protocol.html

“rc” | mcumgr_err_t only appears if non-zero (error condition) when using SMP version 1 or for SMP errors when using SMP version 2.

e.g.:
{off: 73}
{off: 192}
{off: 311}

There's a config added in Zephyr 3.3 (https://docs.zephyrproject.org/latest/releases/release-notes-3.3.html), that allows to disable this behaviour but is defaulted to "n", it can be enabled instead of using this fix:

MCUmgr responses where rc (result code) is 0 (no error) will no longer be present in responses and in cases where there is only an rc result, the resultant response will now be an empty CBOR map. The old behaviour can be restored by enabling CONFIG_MCUMGR_SMP_LEGACY_RC_BEHAVIOUR.

I had no chance to test your change, but looks straightforward.


Removing hacks that avoid using project ID in key protos.

This was because returned dataset IDs in v1beta2 turned foo into s~foo and sometimes this caused mismatches.
@pcostell Do we still need foo and s~foo to be considered "equal" in v1beta3?
I held off on removing the custom _projects_equal, which is used in Key.__eq__, Batch.put, Batch.delete and Client.get_multi. However, by making _projects_equal just check project1 == project2 the system tests pass just fine. (This would fix #821)

LGTM pending @pcostell, unless you want to remove _projects_equal in another PR.

Correct, the project_id will never contain cluster info. From our release notes (current hidden behind a whitelist):

Field dataset_id is now project_id. project_id never includes the app/project ID "prefix" (e.g. "s~"). This fixes https://github.com/GoogleCloudPlatform/google-cloud-datastore/issues/59.

Thanks @pcostell! I confirmed by trying to send s~ and just watching it fail (which is good).
I noticed some extra bytes in the error
'\x08\x05\x121The project s~omega-moonlight-697 does not exist.'

It seems the error is type DebugInfo (available in google/rpc/error_details). Is there some documentation somewhere which describes the errors? AFAIK the error message bodies in v1beta2 are all plain text.

@jonparrott PTAL. I added another commit to remove the prefix checking. I love deleting code.

LGTM. I love watching you delete code.
(There is a surprisingly large amount of code for handling Datastore)

The error is documented [here][https://cloud.google.com/datastore/v1beta3/errors]. Are you sure it's a DebugInfo? It should be a google.rpc.Status message.

Thanks @pcostell. Verified
>>> from google.rpc import status_pb2
>>> status_pb2.Status.FromString('\x08\x05\x121The project s~omega-moonlight-697 does not exist.')
code: 5
message: "The project s~omega-moonlight-697 does not exist."


Develop

I closed the pull request before because of formatting issues, fixed them and created a new one!

Coverage increased (+0.3%) to 97.662% when pulling ffc3d89a7af61d535eb1d56d1f866f762fbea0e1 on Burgi0101:develop into 7f82fcdcb1a2d174e633b63547be442e73631cd5 on joaopgrassi:develop.

Merged. Thanks, @Burgi0101 !


Region enum and other improvements (breaking changes)

Introduced a Region enum which deals with the mapping between numbers (u8) and region ids.
Introducing this new type means Rust can check at compile time that no invalid values can be passed to functions dealing with regions (e.g. no need to check region id is within the valid range).
The Region enum allows for parsing from strings, e.g. "4" would be parsed to Region::NorthEastEngland.
The Target enum also got revamped to encapsulate the user input. This means for example that Target::Postcode would contain the postcode String the user provided.
This is nice when matching this enum as destructuring can be used to access this value directly, instead of having to parse the user input again.
I've also tweaked the handle_result() function to work with any value that can be displayed (using the std::fmt::Display trait which is used when using to_string() or using macros like println!(). This uses dynamic dispatch but I think for the cli part of the crate this is acceptable.
As Region implements this standard Display trait the net effect is that the output would show the human-friendly name of the region, e.g.
xoen$ cargo run -- 13
[...]

Carbon intensity for region London: 82

PS: I've run this locally and it seems to work but please double-check I haven't accidentally broken anything in the process of moving things around :)
NOTE: This is a breaking change - as the public functions signatures changed - so the minor version should be bumped when re-releasing the crate.

Also, if any of the changes don't quite make sense let me know ;)

This is great @xoen, a far more elegant approach!


Use OS-native directory separators in Path.FullPath

There are applications which do not understand the alternate directory separator; for example, https://github.com/cake-build/cake/issues/2337. There have also been multiple CLI tools I've used where I had to do .FullName.Replace('/', '\\').
Would you consider returning OS-native directory separators from Path.FullName? It will just work in all situations, and it will not stand out and look strange on Windows any longer even when it does work.
(At times, I've manually edited MSBuild logs etc so people don't ask why I'm using weird paths.)

@jnm2 I would be OK with using System.IO.Path.DirectorySeparatorChar as the separator (see https://github.com/cake-build/cake/blob/develop/src/Cake.Core/IO/Path.cs#L41), but I wonder how much work it would be and if this would bring any side effects with it. We would also need to fix tests.
Perhaps we could add an overload to FilePath and DirectoryPath to specify (non-UNC) path separators as well, for cases where you would want to use a non OS-native path separator?
public FilePath(string path, char separator) : base(path, separator) {
   ...
}

Just thinking out loud here.

Sweet! If I get to this before anyone else, I'll submit a PR that keeps the APIs the same and chooses System.IO.Path.DirectorySeparatorChar. While fixing the tests, we can see what comes up?

I have also had challenges passing paths to other tools on Windows, that does not like the '/' separator.
My thought was to add a method to FilePath and DirectoryPath with the "right" separators e.g. FullOsPath to not mess with expected outcome of FullPath?

I encountered an issue with NuSpecContent that requires OS-native directory-separator ('') when globbing. c:\foo**\bar.dll works, c:/foo/**/bar.dll does not


How to validate against a schema without a request?

I am working on using openapi-core to validate Kubernetes resource definitions as described here:
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#specifying-a-structural-schema
So far what I have figured out is validating these with a request validator, but I'd like to bypass creating a request if possible because of all the extra steps. Is there a better pattern that I can use to just validate against the schema and avoid the mock request creation?
        template_validator = openapi_core.shortcuts.RequestValidator(
            openapi_core.shortcuts.create_spec({
                "openapi": "3.0.0",
                "info": { "title": "", "version": "0.1" },
                "paths": {
                    "/claimTemplate": {
                        "post": {
                            "requestBody": {
                                "required": True,
                                "content": {
                                    "application/json": {
                                        "schema": {
                                            "$ref": "#/components/schemas/ClaimTemplate"
                                        }
                                    }
                                }
                            },
                            "responses": {}
                        }
                    }
                },
                "components": {
                    "schemas": {
                        "ClaimTemplate": openAPIV3Schema
                    }
                }
            })
        )

        validation_result = template_validator.validate(
            openapi_core.wrappers.mock.MockRequest(
                'http://example.com', 'post', '/claimTemplate',
                path_pattern='/claimTemplate',
                data=json.dumps(template)
            )
        )
        validation_result.raise_for_errors()

Hi @jkupferer , check openapi-spec-validator that openapi-core uses to validate schema itself.

@p1c2u The openapi-spec-validator is only for validating the entire OpenAPI spec definitions, right? What I am trying to do is just validate a YAML or JSON document just using the an OpenAPI schema, just a portion of a full OpenAPI spec, like kubernetes uses in custom resource definitions.

@jkupferer  I got your point now. To do this you can use Schema factory or registry from schemas submodule. In your example it will be something like the following:
from jsonschema.validators import RefResolver
from openapi_spec_validator import default_handlers
from openapi_spec_validator.validators import Dereferencer
from openapi_core.schema.schemas.registries import SchemaRegistry

resolver = RefResolver.from_schema(openAPIV3Schema, handlers=default_handlers)
dereferencer = Dereferencer(resolver)
schema_registry = SchemaRegistry(dereferencer)
schema, _ = schema_registry.get_or_create(openAPIV3Schema)

now to validate against the schema:
schema.validate(x)

Could you give a concrete example for openAPIV3Schema and x?

I separated schema validation to openapi-schema-validator library
https://github.com/p1c2u/openapi-schema-validator
hence closing the issue