BackgroundGeolocation.stop() crashes the app

Your Environment

Plugin version: git+https://github.com/darron1217/react-native-background-geolocation.git#develop
Platform: Android
OS version:  10
Device manufacturer and model:

Running in Simulator: YES
React Native version: 0.63.4
Plugin configuration options:

{
      desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
      stationaryRadius: 50,
      distanceFilter: 50,
      notificationTitle: 'Background tracking',
      notificationText: 'enabled',
      debug: true,
      startOnBoot: false,
      stopOnTerminate: false,
      locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER,
      interval: 10000,
      fastestInterval: 5000,
      activitiesInterval: 10000,
      stopOnStillActivity: false,
      url: 'http://<IP_ADDRESS>:3000/location',
      httpHeaders: {
        'X-FOO': 'bar',
      },
      // customize post properties
      postTemplate: {
        lat: '@latitude',
        lon: '@longitude',
        foo: 'bar', // you can also add your own properties
      },
    }

Context

I am using the example code provided in the Readme available with a small addition of trying to stop the location tracking on click of a button, here is the code:
    BackgroundGeolocation.checkStatus(
      ({isRunning, locationServicesEnabled, authorization}) => {
        if (isRunning) {
          BackgroundGeolocation.stop();
          return false;
        }

        if (!locationServicesEnabled) {
          Alert.alert(
            'Location services disabled',
            'Would you like to open location settings?',
            [
              {
                text: 'Yes',
                onPress: () => BackgroundGeolocation.showLocationSettings(),
              },
              {
                text: 'No',
                onPress: () => console.log('No Pressed'),
                style: 'cancel',
              },
            ],
          );
          return false;
        }

        if (authorization == 99) {
          // authorization yet to be determined
          BackgroundGeolocation.start();
        } else if (authorization == BackgroundGeolocation.AUTHORIZED) {
          // calling start will also ask user for permission if needed
          // permission error will be handled in permisision_denied event
          BackgroundGeolocation.start();
        } else {
          Alert.alert(
            'App requires location tracking',
            'Please grant permission',
            [
              {
                text: 'Ok',
                onPress: () => BackgroundGeolocation.start(),
              },
            ],
          );
        }
      },
    );
  }

Once BackgroundGeolocation.stop() is fired the app stops responding and crashes.
Expected Behavior

Once BackgroundGeolocation.stop() is fired the app does not crash and just stops location tracking
Thank you for taking this repository and trying to make it up to date again. I would really like to help in any way possible to make this work for more people.

Please update the library to latest.
It's now available on npm repo.
yarn add @darron1217/react-native-background-geolocation

Hello! I have the same problem. When I call BackgroundGeolocation.stop (), my activity is paused for approximately 8 seconds, then geolicalization is successfully completed and finally the activity is reactivated with the updated states.
I call Stop function from a 'react-native' button like this:
<Button title={isRunning ? 'Pause' : 'Start'} onPress={() => toggleTracking()} />

@darron1217/react-native-background-geolocation: "^0.6.6"
react-native: "0.64.2"
Device: Moto G5

I hope to help in the project.
My logcat throws this. Greetings.
--------- beginning of main
2021-07-26 15:57:34.491 7024-7097/com.myapp D/com.marianhello.bgloc.BackgroundGeolocationFacade: Stopping service
2021-07-26 15:57:34.513 7024-7097/com.myapp I/com.marianhello.bgloc.BackgroundGeolocationFacade: Attempt to stop bg service2021-07-26 15:57:34.528 7024-7024/com.myapp D/com.marianhello.bgloc.service.LocationServiceImpl: Service in [STARTED] state. cmdId: [2]. startId: [2]
2021-07-26 15:57:34.541 7024-7024/com.myapp I/com.marianhello.bgloc.provider.ActivityRecognitionLocationProvider: Stop recording
2021-07-26 15:57:34.566 7024-7024/com.myapp I/com.marianhello.bgloc.service.LocationServiceImpl: Destroying LocationServiceImpl
2021-07-26 15:57:34.579 1801-7595/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:984 com.android.server.location.GnssLocationProvider.reportStatus:1887
2021-07-26 15:57:34.582 1801-7595/? E/ActivityManager: Sending non-protected broadcast com.motorola.location.instrumentation from system 1801:system/1000 pkg android
java.lang.Throwable
at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19602)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:20136)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20383)
at android.app.ContextImpl.sendBroadcast(ContextImpl.java:990)
at com.android.server.location.GnssLocationProvider.reportStatus(GnssLocationProvider.java:1887)
2021-07-26 15:57:34.584 1801-7595/? E/ActivityManager: Sending non-protected broadcast com.motorola.location.instrumentation from system 1801:system/1000 pkg android
java.lang.Throwable
at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19602)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:20229)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20383)
at android.app.ContextImpl.sendBroadcast(ContextImpl.java:990)
at com.android.server.location.GnssLocationProvider.reportStatus(GnssLocationProvider.java:1887)
2021-07-26 15:57:34.592 1801-7595/? V/LocSvc_HIDL_OsNpGlue_jni: [onStopRequest][80] [HC] <<= [HS]
2021-07-26 15:57:34.602 7024-7024/com.myapp I/com.marianhello.bgloc.provider.ActivityRecognitionLocationProvider: Destroying ActivityRecognitionLocationProvider
2021-07-26 15:57:34.632 7024-7024/com.myapp I/com.marianhello.bgloc.provider.ActivityRecognitionLocationProvider: Stop recording
2021-07-26 15:57:34.707 814-814/? I/SFPerfTracer:      triggers: (rate: 3890:646354) (compose: 0:193) (post: 0:398) (render: 0:855) (29:2893420 frames) (30:3208579)
2021-07-26 15:57:34.707 814-814/? D/SFPerfTracer:        layers: (4:10) (StatusBar#0 (0xac6e4000): 3:135607) (animation background stackId=1#0 (0xac678000): 0:896)* (DimLayerController/Stack=0#0 (0xac30f000): 0:6131)* (Sprite#0 (0xac327000): 0:57)* (DockedStackDim#0 (0xac317000): 0:44)* (com.android.systemui.ImageWallpaper#0 (0xac652000): 0:1389)* (NavigationBar#0 (0xac67e000): 0:14435) (com.myapp/com.myapp.MainActivity#0 (0xac31f000): 17:776) (Toast#0 (0xac6f2000): 0:65)- (Toast#0 (0xac6f2000): 29:64)
2021-07-26 15:57:35.702 775-775/? D/MotoSensors: ALS 303
2021-07-26 15:57:38.314 1801-2106/? E/WifiScanningService: Got invalid work source request: WorkSource{} from ClientInfo[uid=10028,android.os.Messenger@7741ba3]
2021-07-26 15:57:38.319 1801-2106/? D/WifiNative-wlan0: Scan issued for specific freq..
2021-07-26 15:57:39.107 1801-4328/? D/WificondControl: Scan result ready event
2021-07-26 15:57:39.464 814-904/? I/SFPerfTracer:      triggers: (rate: 6:275) (1361232 sw vsyncs) (0 skipped) (271:5710191 vsyncs) (273:7415176)
2021-07-26 15:57:41.705 10735-10789/? I/zygote: Deoptimizing java.lang.Object ht.b(java.lang.Object) due to JIT inline cache
2021-07-26 15:57:46.676 775-1959/? D/MotoSensors: ALS 155
2021-07-26 15:57:54.562 1801-1851/? W/ActivityManager: Timeout executing service: ServiceRecord{907c04c u0 com.myapp/com.marianhello.bgloc.service.LocationServiceImpl}
2021-07-26 15:57:55.261 775-1959/? D/MotoSensors: ALS 307
2021-07-26 15:57:55.330 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 7024
2021-07-26 15:57:55.331 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 7024 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:55.332 7024-7030/com.myapp I/zygote: Thread[3,tid=7030,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12f00728,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:55.632 1028-1028/? I//system/bin/tombstoned: received crash request for pid 7024
2021-07-26 15:57:55.632 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 7024
2021-07-26 15:57:55.633 7024-7030/com.myapp I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:55.633 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 7024
2021-07-26 15:57:55.635 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 7024
2021-07-26 15:57:55.636 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 1801
2021-07-26 15:57:55.636 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 1801 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:55.637 1801-1807/? I/zygote: Thread[2,tid=1807,WaitingInMainSignalCatcherLoop,Thread*=0xab935c00,peer=0x13cc16a8,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:56.056 1801-1970/? I/zygote: hidl_ssvc_poll: spurious wake up, back to work
2021-07-26 15:57:56.771 1028-1028/? I//system/bin/tombstoned: received crash request for pid 1801
2021-07-26 15:57:56.771 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 1801
2021-07-26 15:57:56.772 1801-1807/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:56.772 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 1801
2021-07-26 15:57:56.779 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 1801
2021-07-26 15:57:56.779 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 25109
2021-07-26 15:57:56.780 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 25109 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:56.780 25109-25115/? I/zygote: Thread[3,tid=25115,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12c80228,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:57.159 1028-1028/? I//system/bin/tombstoned: received crash request for pid 25109
2021-07-26 15:57:57.159 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 25109
2021-07-26 15:57:57.160 25109-25115/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:57.160 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 25109
2021-07-26 15:57:57.162 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 25109
2021-07-26 15:57:57.162 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 2653
2021-07-26 15:57:57.163 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 2653 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:57.164 2653-2666/? I/zygote: Thread[3,tid=2666,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12c80228,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:57.281 1028-1028/? I//system/bin/tombstoned: received crash request for pid 2653
2021-07-26 15:57:57.282 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 2653
2021-07-26 15:57:57.283 2653-2666/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:57.283 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 2653
2021-07-26 15:57:57.284 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 2653
2021-07-26 15:57:57.284 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 31550
2021-07-26 15:57:57.285 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 31550 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:57.286 31550-31556/? I/zygote: Thread[3,tid=31556,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12e00020,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:57.384 1028-1028/? I//system/bin/tombstoned: received crash request for pid 31550
2021-07-26 15:57:57.385 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 31550
2021-07-26 15:57:57.385 31550-31556/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:57.386 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 31550
2021-07-26 15:57:57.386 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 31550
2021-07-26 15:57:57.386 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 2321
2021-07-26 15:57:57.387 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 2321 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:57.388 2321-2330/? I/zygote: Thread[3,tid=2330,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x13040228,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:57.804 1028-1028/? I//system/bin/tombstoned: received crash request for pid 2321
2021-07-26 15:57:57.805 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 2321
2021-07-26 15:57:57.805 2321-2330/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:57.806 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 2321
2021-07-26 15:57:57.807 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 2321
2021-07-26 15:57:57.807 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 2302
2021-07-26 15:57:57.808 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 2302 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:57.809 2302-2317/? I/zygote: Thread[3,tid=2317,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12d40228,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:57.856 775-775/? D/MotoSensors: ALS 174
2021-07-26 15:57:58.051 1028-1028/? I//system/bin/tombstoned: received crash request for pid 2302
2021-07-26 15:57:58.051 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 2302
2021-07-26 15:57:58.052 2302-2317/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:58.052 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 2302
2021-07-26 15:57:58.053 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 2302
2021-07-26 15:57:58.054 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 2286
2021-07-26 15:57:58.054 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 2286 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:58.055 2286-2295/? I/zygote: Thread[3,tid=2295,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12c80228,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:58.160 1028-1028/? I//system/bin/tombstoned: received crash request for pid 2286
2021-07-26 15:57:58.160 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 2286
2021-07-26 15:57:58.160 2286-2295/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:58.160 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 2286
2021-07-26 15:57:58.161 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 2286
2021-07-26 15:57:58.161 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 2274
2021-07-26 15:57:58.162 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 2274 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:58.163 2274-2280/? I/zygote: Thread[3,tid=2280,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12d80228,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:58.314 1028-1028/? I//system/bin/tombstoned: received crash request for pid 2274
2021-07-26 15:57:58.314 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 2274
2021-07-26 15:57:58.315 2274-2280/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:58.315 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 2274
2021-07-26 15:57:58.316 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 2274
2021-07-26 15:57:58.316 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 2181
2021-07-26 15:57:58.316 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 2181 and type kDebuggerdJavaBacktrace
2021-07-26 15:57:58.317 2181-2193/? I/zygote: Thread[3,tid=2193,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12d409b0,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:57:58.576 1028-1028/? I//system/bin/tombstoned: received crash request for pid 2181
2021-07-26 15:57:58.577 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 2181
2021-07-26 15:57:58.577 2181-2193/? I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:57:58.577 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 2181
2021-07-26 15:57:58.579 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 2181
2021-07-26 15:57:58.580 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 814
2021-07-26 15:57:58.581 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 814 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:58.582 814-814/? I/libc: Requested dump for tid 814 (surfaceflinger)
2021-07-26 15:57:58.709 11009-11009/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdNativeBacktrace
2021-07-26 15:57:58.709 1028-1028/? I//system/bin/tombstoned: received crash request for pid 814
2021-07-26 15:57:58.709 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 814
2021-07-26 15:57:58.710 11009-11009/? I/crash_dump32: performing dump of process 814 (target tid = 814)
2021-07-26 15:57:58.911 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 814
2021-07-26 15:57:58.914 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 814
2021-07-26 15:57:58.914 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 995
2021-07-26 15:57:58.915 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 995 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:58.915 995-995/? I/libc: Requested dump for tid 995 (audioserver)
2021-07-26 15:57:59.004 11012-11012/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdNativeBacktrace
2021-07-26 15:57:59.005 1028-1028/? I//system/bin/tombstoned: received crash request for pid 995
2021-07-26 15:57:59.005 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 995
2021-07-26 15:57:59.005 11012-11012/? I/crash_dump32: performing dump of process 995 (target tid = 995)
2021-07-26 15:57:59.193 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 995
2021-07-26 15:57:59.194 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 995
2021-07-26 15:57:59.194 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 996
2021-07-26 15:57:59.196 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 996 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:59.196 996-996/? I/libc: Requested dump for tid 996 (cameraserver)
2021-07-26 15:57:59.263 11015-11015/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdNativeBacktrace
2021-07-26 15:57:59.264 1028-1028/? I//system/bin/tombstoned: received crash request for pid 996
2021-07-26 15:57:59.264 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 996
2021-07-26 15:57:59.264 11015-11015/? I/crash_dump32: performing dump of process 996 (target tid = 996)
2021-07-26 15:57:59.393 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 996
2021-07-26 15:57:59.394 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 996
2021-07-26 15:57:59.394 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 998
2021-07-26 15:57:59.395 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 998 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:59.395 998-998/? I/libc: Requested dump for tid 998 (drmserver)
2021-07-26 15:57:59.456 11018-11018/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdNativeBacktrace
2021-07-26 15:57:59.456 1028-1028/? I//system/bin/tombstoned: received crash request for pid 998
2021-07-26 15:57:59.456 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 998
2021-07-26 15:57:59.457 11018-11018/? I/crash_dump32: performing dump of process 998 (target tid = 998)
2021-07-26 15:57:59.594 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 998
2021-07-26 15:57:59.595 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 998
2021-07-26 15:57:59.596 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 1000
2021-07-26 15:57:59.596 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 1000 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:59.592 1801-1801/? W/ActivityManager: type=1400 audit(0.0:17372): avc: denied { signal } for uid=1000 scontext=u:r:system_server:s0 tcontext=u:r:installd:s0 tclass=process permissive=0
2021-07-26 15:57:59.597 1801-1851/? E/zygote: libdebuggerd_client: failed to send signal to pid 1000: Permission denied
2021-07-26 15:57:59.597 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 1002
2021-07-26 15:57:59.597 1028-1028/? I//system/bin/tombstoned: intercept for pid 1000 and type kDebuggerdNativeBacktrace terminated: due to input
2021-07-26 15:57:59.598 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 1002 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:59.598 1002-1002/? I/libc: Requested dump for tid 1002 (mediadrmserver)
2021-07-26 15:57:59.633 11022-11022/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdNativeBacktrace
2021-07-26 15:57:59.634 1028-1028/? I//system/bin/tombstoned: received crash request for pid 1002
2021-07-26 15:57:59.634 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 1002
2021-07-26 15:57:59.634 11022-11022/? I/crash_dump32: performing dump of process 1002 (target tid = 1002)
2021-07-26 15:57:59.652 775-775/? D/MotoSensors: ALS 324
2021-07-26 15:57:59.729 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 1002
2021-07-26 15:57:59.730 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 1002
2021-07-26 15:57:59.731 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 1003
2021-07-26 15:57:59.732 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 1003 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:59.732 1028-1028/? I//system/bin/tombstoned: received crash request for pid 1003
2021-07-26 15:57:59.732 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 1003
2021-07-26 15:57:59.836 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 1003
2021-07-26 15:57:59.837 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 1003
2021-07-26 15:57:59.837 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 1006
2021-07-26 15:57:59.838 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 1006 and type kDebuggerdNativeBacktrace
2021-07-26 15:57:59.839 1006-1006/? I/libc: Requested dump for tid 1006 (mediaserver)
2021-07-26 15:57:59.902 11025-11025/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdNativeBacktrace
2021-07-26 15:57:59.902 1028-1028/? I//system/bin/tombstoned: received crash request for pid 1006
2021-07-26 15:57:59.903 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 1006
2021-07-26 15:57:59.903 11025-11025/? I/crash_dump32: performing dump of process 1006 (target tid = 1006)
2021-07-26 15:58:00.054 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 1006
2021-07-26 15:58:00.055 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 1006
2021-07-26 15:58:00.055 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 1007
2021-07-26 15:58:00.052 1801-1801/? W/ActivityManager: type=1400 audit(0.0:17373): avc: denied { signal } for uid=1000 scontext=u:r:system_server:s0 tcontext=u:r:netd:s0 tclass=process permissive=0
2021-07-26 15:58:00.056 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 1007 and type kDebuggerdNativeBacktrace
2021-07-26 15:58:00.056 1801-1851/? E/zygote: libdebuggerd_client: failed to send signal to pid 1007: Permission denied
2021-07-26 15:58:00.056 1028-1028/? I//system/bin/tombstoned: intercept for pid 1007 and type kDebuggerdNativeBacktrace terminated: due to input
2021-07-26 15:58:00.056 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 1010
2021-07-26 15:58:00.057 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 1010 and type kDebuggerdNativeBacktrace
2021-07-26 15:58:00.058 1028-1028/? I//system/bin/tombstoned: received crash request for pid 1010
2021-07-26 15:58:00.058 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 1010
2021-07-26 15:58:00.261 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 1010
2021-07-26 15:58:00.262 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 1010
2021-07-26 15:58:00.262 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 8310
2021-07-26 15:58:00.263 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 8310 and type kDebuggerdNativeBacktrace
2021-07-26 15:58:00.263 8310-8310/? I/libc: Requested dump for tid 8310 (droid.bluetooth)
2021-07-26 15:58:00.393 11029-11029/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdNativeBacktrace
2021-07-26 15:58:00.394 1028-1028/? I//system/bin/tombstoned: received crash request for pid 8310
2021-07-26 15:58:00.394 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 8310
2021-07-26 15:58:00.394 11029-11029/? I/crash_dump32: performing dump of process 8310 (target tid = 8310)
2021-07-26 15:58:01.494 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 8310
2021-07-26 15:58:01.500 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 8310
2021-07-26 15:58:01.501 1801-1851/? I/zygote: libdebuggerd_client: started dumping process 7247
2021-07-26 15:58:01.501 1028-1028/? I//system/bin/tombstoned: registered intercept for pid 7247 and type kDebuggerdJavaBacktrace
2021-07-26 15:58:01.502 7247-7254/com.myapp I/zygote: Thread[3,tid=7254,WaitingInMainSignalCatcherLoop,Thread*=0xab936200,peer=0x12d802a8,"Signal Catcher"]: reacting to signal 3
2021-07-26 15:58:01.670 1028-1028/? I//system/bin/tombstoned: received crash request for pid 7247
2021-07-26 15:58:01.670 1028-1028/? I//system/bin/tombstoned: found intercept fd 513 for pid 7247
2021-07-26 15:58:01.671 7247-7254/com.myapp I/zygote: Wrote stack traces to '[tombstoned]'
2021-07-26 15:58:01.671 1028-1028/? I//system/bin/tombstoned: remove intercept fd 512 for pid 7247
2021-07-26 15:58:01.672 1801-1851/? I/zygote: libdebuggerd_client: done dumping process 7247
2021-07-26 15:58:01.672 1801-1851/? W/Watchdog: logMainLooperInSystemServer : start.
2021-07-26 15:58:01.673 1801-1851/? W/Watchdog: logMainLooperInSystemServer : end.
2021-07-26 15:58:01.724 1801-1851/? E/ActivityManager: ANR in com.myapp
PID: 7024
Reason: executing service com.myapp/com.marianhello.bgloc.service.LocationServiceImpl
Load: 4.51 / 4.57 / 4.68
CPU usage from 0ms to 7111ms later (2021-07-26 15:57:54.563 to 2021-07-26 15:58:01.673):
15% TOTAL: 8.3% user + 6.5% kernel + 0.3% iowait + 0.5% irq + 0.1% softirq
29% 1801/system_server: 17% user + 11% kernel / faults: 1729 minor 11 major
9.5% 151/kswapd0: 0% user + 9.5% kernel
4.9% 2321/com.android.phone: 3.9% user + 0.9% kernel / faults: 540 minor 10 major
4.6% 7024/com.myapp: 3.9% user + 0.7% kernel / faults: 677 minor 23 major
0.1% 25109/com.google.android.inputmethod.latin: 0.1% user + 0% kernel / faults: 1058 minor 25 major
4.3% 7247/com.myapp:sync: 3.3% user + 0.9% kernel / faults: 879 minor 24 major
3.8% 2181/com.android.systemui: 3.1% user + 0.7% kernel / faults: 496 minor 3 major
3.3% 10915/kworker/u16:2: 0% user + 3.3% kernel
3.2% 2302/com.motorola.process.system: 2.8% user + 0.4% kernel / faults: 439 minor 8 major
0% 1010/media.codec: 0% user + 0% kernel / faults: 1672 minor 1 major
0% 2274/.dataservices: 0% user + 0% kernel / faults: 632 minor 1 major
1.8% 260/spi4: 0% user + 1.8% kernel
0% 2653/com.motorola.process.slpc: 0% user + 0% kernel / faults: 733 minor 2 major
0% 2286/com.qualcomm.qti.telephonyservice: 0% user + 0% kernel / faults: 594 minor 1 major
0% 31550/com.motorola.frameworks.singlehand: 0% user + 0% kernel / faults: 594 minor 1 major
0% 1003/media.extractor: 0% user + 0% kernel / faults: 982 minor 1 major
1.1% 8642/kworker/u16:6: 0% user + 1.1% kernel
1.1% 13723/com.brave.browser: 0.8% user + 0.2% kernel / faults: 275 minor 97 major
0.9% 7/rcu_preempt: 0% user + 0.9% kernel
0.9%<EMAIL_ADDRESS>0.2% user + 0.7% kernel / faults: 356 minor
0.8% 1247/adbd: 0.4% user + 0.4% kernel / faults: 238 minor
0.5% 10/rcuop/0: 0% user + 0.5% kernel
0.5% 45/rcuop/4: 0% user + 0.5% kernel
0.5% 334/cfinteractive: 0% user + 0.5% kernel
0.5% 340/mmc-cmdqd/0: 0% user + 0.5% kernel
0.5% 667/logd: 0.1% user + 0.4% kernel / faults: 1 minor
0% 1028/tombstoned: 0% user + 0% kernel / faults: 222 minor
0.4% 61/rcuop/6: 0% user + 0.4% kernel
0.4% 9048/com.brave.browser:sandboxed_process18: 0.2% user + 0.1% kernel / faults: 207 minor 133 major
0.2% 69/rcuop/7: 0% user + 0.2% kernel
0.2% 814/surfaceflinger: 0.2% user + 0% kernel / faults: 39 minor 1 major
0.2% 995/audioserver: 0% user + 0.2% kernel / faults: 49 minor
0.2% 1007/netd: 0% user + 0.2% kernel / faults: 35 minor
0.2% 7664/com.instagram.android: 0% user + 0.2% kernel / faults: 68 minor 111 major
0.2% 10958/logcat: 0.1% user + 0.1% kernel
0% 1//init: 0% user + 0% kernel / faults: 19 minor
0.1% 53/rcuop/5: 0% user + 0.1% kernel
0.1% 377/kworker/7:1H: 0% user + 0.1% kernel
0.1%<EMAIL_ADDRESS>0.1% user + 0% kernel / faults: 4 minor
0.1% 988/thermal-engine: 0% user + 0.1% kernel
0% 998/drmserver: 0% user + 0% kernel / faults: 106 minor
0% 1006/mediaserver: 0% user + 0% kernel / faults: 63 minor
0.1% 1009/wificond: 0% user + 0.1% kernel
0.1% 7141/com.motorola.motocare: 0.1% user + 0% kernel / faults: 1 minor
0.1% 7241/kworker/5:0: 0% user + 0.1% kernel
0.1% 8228/com.twitter.android: 0.1% user + 0% kernel / faults: 6 minor 11 major
0% 8310/com.android.bluetooth: 0% user + 0% kernel / faults: 99 minor 1 major
0% 8613/kworker/4:2: 0% user + 0% kernel
0.1% 9157/com.google.android.apps.docs: 0.1% user + 0% kernel / faults: 16 minor 6 major
0.1% 9603/com.google.android.apps.messaging: 0.1% user + 0% kernel / faults: 1 minor
0.1% 10467/com.spotify.lite: 0% user + 0.1% kernel / faults: 2 minor
0.1% 27512/com.xiaomi.hm.health: 0.1% user + 0% kernel / faults: 20 minor
CPU usage from 100ms to 699ms later (2021-07-26 15:57:54.662 to 2021-07-26 15:57:55.262):
11% TOTAL: 5.2% user + 5.6% kernel + 0.2% softirq
55% 1801/system_server: 27% user + 27% kernel / faults: 550 minor
52% 1851/ActivityManager: 27
2021-07-26 15:58:01.780 1801-11032/? W/DropBoxManagerService: Dropping: data_app_anr (10 > 0 bytes)
2021-07-26 15:58:01.783 1801-1851/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
2021-07-26 15:58:01.783 1801-1851/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
2021-07-26 15:58:01.784 1801-6453/? I/OpenGLRenderer: Initialized EGL, version 1.4
2021-07-26 15:58:01.784 1801-6453/? D/OpenGLRenderer: Swap behavior 2
2021-07-26 15:58:02.027 19813-19823/? I/zygote: Background concurrent copying GC freed 181039(9MB) AllocSpace objects, 50(2MB) LOS objects, 49% free, 13MB/26MB, paused 239us total 222.743ms
2021-07-26 15:58:03.284 775-1959/? D/MotoSensors: ALS 154
2021-07-26 15:58:06.077 775-1959/? D/MotoSensors: ALS 339
2021-07-26 15:58:07.497 1801-1960/? D/BatteryService: uevent={POWER_SUPPLY_VOLTAGE_NOW=4091925, POWER_SUPPLY_CHARGE_RATE=Normal, POWER_SUPPLY_HEALTH=Good, POWER_SUPPLY_CURRENT_NOW=-178679, POWER_SUPPLY_PRESENT=1, SUBSYSTEM=power_supply, POWER_SUPPLY_TEMP=252, SEQNUM=454737, ACTION=change, POWER_SUPPLY_NAME=battery, POWER_SUPPLY_STATUS=Charging, POWER_SUPPLY_CHARGE_COUNTER=2447508, POWER_SUPPLY_CAPACITY=74, DEVPATH=/devices/soc/qpnp-smbcharger-17/power_supply/battery}
2021-07-26 15:58:09.894 1801-2051/? D/RecurrenceRule: Resolving using anchor 2021-07-26T15:58:09.893-05:00[America/Mexico_City]
2021-07-26 15:58:09.902 1801-2051/? D/RecurrenceRule: Resolving using anchor 2021-07-26T15:58:09.902-05:00[America/Mexico_City]
2021-07-26 15:58:09.910 1801-2051/? D/RecurrenceRule: Cycle 18 from 2021-07-16T00:00-05:00[America/Mexico_City] to 2021-08-16T00:00-05:00[America/Mexico_City]
2021-07-26 15:58:09.911 1801-2051/? D/NetworkStats: Resolving plan for NetworkTemplate: matchRule=MOBILE_ALL, subscriberId=334020..., matchSubscriberIds=[334020...]
2021-07-26 15:58:09.914 1801-2051/? D/NetworkStats: Found active matching subId 9
2021-07-26 15:58:09.922 1801-2051/? D/NetworkStats: Resolved to plan null


null in summary response cause portal to go blank

Recent Azul changes fixed a bug that caused null values to be artificially suppressed in the /summary response. This bug is now fixed and the resulting null values in the summary response cause a null pointer exception in the Data Portal.

Thanks @hannes-ucsc will fix. By the way, what is the meaning of 0:null ?

It's an array with the first and only element being null. The zero is just added by the browser's inspect UI.

Yea, I mean what is the meaning of the null value in the array?

For organTypes, the presence of null in the summary means that there are samples that don't have an organ.
For, cellCountSummary

indicates that there are 1,758 cell suspensions without an associated organ and that the sum the total_cell_count property of each of those cell suspensions equals 4.5 million cells.

OK great thanks.
@frano-m we need to change null to "Unspecified" before we try to do the camel case fix.


[ENH]: Metadata Indexes

Description of changes
Summarize the changes made by this PR.

Improvements & Bug fixes

...

New functionality

...

Test plan
How are these changes tested?

[ ] Tests pass locally with pytest for python, yarn test for js

Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

@HammadB, I think we have some basic working prototype. Have a look at API changes and let me know wdyt.
See examples/basic_functionality/metadata_index_testing.ipynb (last couple of cells) for an example (note I use the client for now but will pull this to Collection)

@HammadB, nvm I just saw that the rebase did a number of me :D let me try and fix that.

Can we break into two PRs:

Code change
CIP


Method fails

Hi,
my proxies.json looks like this:
{     "$schema": "http://json.schemastore.org/proxies",     "proxies": {         "apiProxy": {             "matchCondition": {                 "route": "api/{*path}"             },             "backendUri": "https://%WEBSITE_SITE_NAME%.azurewebsites.net/api/{path}"         },         "staticProxy": {             "matchCondition": {                 "route": "{*path}"             },             "backendUri": "https://%WEBSITE_SITE_NAME%.azurewebsites.net/api/static?file={path}"         }     } }
This was working for months, but fails now. Instead of proxying the request to my "static" function, the default "Your Function App is up and running" shows..
Any ideas what could go wrong?
Best Regards

This started happening this weekend. I'm currently debugging an app that was working on Wednesday but no longer working today. Same issue. Need to look into it.

Thanks your sharing your experience so quickly! "good" to hear it's not a specific issue in my environment.

https://github.com/Azure/app-service-announcements/issues/50


⚠ Bofrost.de has degraded performance

In 70c8c63, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1149 ms

Resolved: Bofrost.de performance has improved in d09ad20 after 13 minutes.


chore(deps): depend on blobstream contracts

Overview

Checklist

[ ] New and updated code has appropriate documentation
[ ] New and updated code has new and/or updated testing
[ ] Required CI checks are passing
[ ] Visual proof for any user facing features like CLI or documentation updates
[ ] Linked issues closed with keywords

Codecov Report

Merging #550 (f63888b) into main (6b49e95) will increase coverage by 0.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #550      +/-   ##
==========================================
+ Coverage   34.04%   34.23%   +0.19%
==========================================
  Files          26       26
  Lines        2100     2100
==========================================
+ Hits          715      719       +4
+ Misses       1298     1295       -3
+ Partials       87       86       -1

Files
Coverage Δ

evm/evm_client.go
52.25% <ø> (ø)

relayer/relayer.go
0.00% <ø> (ø)

... and 1 file with indirect coverage changes


Order of loading of global middlewares

I have two global middlewares (both useBefore), how is the order of execution decided if we load the middlewares from directory.
Secondly, order of middlewares if passed as an array doesn't seem to have any effect.
const app = createKoaServer({
    defaultErrorHandler: false,
    routePrefix: "/v1",
    authorizationChecker: async (action: Action, claims: string[]) => {
        const verifyJwt = jwt(jwtConfig).unless({ path: ['/v1/auth/token', /^\/v1\/accounts/] });
        await verifyJwt(action.context, () => { });
        const user = action.context.state.user;
        if (user.role.includes('admin')) {
            return true;
        }
        for (const claim of claims) {
            if (user.scope.includes(claim)) {
                return true;
            }
        }

        throw new ForbiddenError("you do not have required permissions");
    },
    controllers: [__dirname + "/api/controllers/*.js"],
    middlewares: [CustomErrorHandler, JwtMiddleware]
}).listen(3000);

how is the order of execution decided if we load the middlewares from directory.

The @Middleware decorator supports the priority option. (src/decorator/Middleware.ts#L7) The lower is the higher.

order of middlewares if passed as an array doesn't seem to have any effect.

That should work, when you pass them as an array, they should be executed in the same order. In your case CustomErrorHandler handler will be executed first and JwtMiddleware as second. (Dont you want to use your CustomErrorHandler as last? An error dropped in the JwtMiddleware wont be cached by it if you call it first.)

CustomErrorHandler wraps await next() inside a try catch hence it catches every error, so should be invoked first to wrap the whole pipeline in the try catch block. Changing the order of middlewares in the array didn't have any effect, JwtMiddleware was always invoked first. I think priority needs to be added to make it work even for array.

I think priority needs to be added to make it work even for array.

You're right, I've checked that and without priority the order is unknown. Only after adding priority the order is correct as we've set.
The key is in that line:
https://github.com/pleerock/routing-controllers/blob/master/src/RoutingControllers.ts#L98
We sort the array by priority but the sorting algorithm in V8 is not stable so it's get randomized when priority is undefined (for middlewares loaded explicitly, not by dir glob) or because of .reverse(); call the order is reversed. Also the middlewares from dir are concated to the explicit array:
https://github.com/19majkel94/routing-controllers/blob/404-return-type-fix/src/index.ts#L159-L161
So @NoNameProvided I think we could filter the middlewares that doesn't have priority (manually loaded) and then concat to them the rest sorted by priority. If this makes sense, I will try to make an PR 😉

Hmm, I think we should just swap them for a default value instead of handling them differently.
But there is more than that to consider.
Lower is higher vs Higher is Higher
It's strange to have a lower is higher approach on priority. I think this should be swapped. But this is a breaking change. What do you think about this? (cc @pleerock because this is a breaking change, but we are below 1.0 so in theory we are allowed to do it.)
Sorting algorithm
We should write a custom sort function to prevent calling reverse after sorting. Also if we would have a "Higher is Higher" approach we would be able to default to 1 when priority is undefined.
If we make those change a basic sorting function could be something like:
 .sort((ma, mb) => {
  ma.priority = ma.priority ? ma.priority : 1;
  mb.priority = mb.priority ? mb.priority : 1;

  return mb.priority - ma.priority;
})

Thoughts @19majkel94 & @pleerock

It's strange to have a lower is higher approach on priority. I think this should be swapped. But this is a breaking change. What do you think about this? (cc @pleerock because this is a breaking change, but we are below 1.0 so in theory we are allowed to do it.)

We have this in code:
.sort((middleware1, middleware2) => middleware1.priority - middleware2.priority)
.reverse()

So 3, 1, 5 is sorted as 1, 3, 5 but then reversed, so higher priority value -> first in middleware chain. And I've just checked that and confirm that higher is higher, which is correct 😃
The problem is with reverse sorting - V8 sorting algo isn't stable so we get reverse order, not the one we defined in array:
const objects = [
    {
        name: "und one",
    },
    {
        name: "und two",
    },
    {
        name: "und three",
    },
    {
        name: "four",
        value: 4,
    },
    {
        name: "two",
        value: 2,
    },
    {
        name: "one",
        value: 1,
    },
    {
        name: "three",
        value: 3,
    },
]

const sorted1 = objects.sort((a, b) => a.value - b.value).reverse()
console.log(sorted1)

[
  { name: 'four', value: 4 },
  { name: 'three', value: 3 },
  { name: 'two', value: 2 },
  { name: 'one', value: 1 },
  { name: 'und three' },
  { name: 'und two' },
  { name: 'und one' },
]

So we need to copy the middlewares passed explicitly, sort only the glob-string-loaded ones and concat it to the first one. So we should receive then:
[
  { name: 'und one' },
  { name: 'und two' },
  { name: 'und three' },
  { name: 'four', value: 4 },
  { name: 'three', value: 3 },
  { name: 'two', value: 2 },
  { name: 'one', value: 1 },
]

If you agree with me, I think I could to the PR 😉

So 3, 1, 5 is sorted as 1, 3, 5 but then reversed, so higher priority value -> first in middleware chain.

😱  then I just lied in my first comment, sorry for that @adnan-kamili!

The problem is with reverse sorting

But we dont have to call reverse if we sort it correctly the first time. All you have to do is call
const sorted = objects.sort((a, b) => b.value - a.value)
console.log(sorted)

You're right 😔 I've forget that the sorting mutates the array, not like the filter returning new array but only a reference to the mutated array:
const sorted1 = objects.sort((a, b) => a.value - b.value).reverse()
console.log(sorted1)
const sorted2 = objects.sort((a, b) => b.value - a.value)
console.log(sorted2)

And it printed the same. But now I've checked and you're right. Undefined is not a problem in that case:
const sorted2 = [...objects].sort((a, b) => b.value - a.value)
console.log(sorted2)

[ { name: 'und one' },
  { name: 'und two' },
  { name: 'und three' },
  { name: 'four', value: 4 },
  { name: 'three', value: 3 },
  { name: 'two', value: 2 },
  { name: 'one', value: 1 } ]

So it should be really small fix. However sort() isn't guaranteed to be stable  - looks like it is in V8 but I don't know how node-chakra behave :wink:

However sort() isn't guaranteed to be stable

Thats true, and we can overcome it by simply defaulting to the lowest priority if priority is undefined.
 .sort((ma, mb) => {
  ma.priority = ma.priority ? ma.priority : 1;
  mb.priority = mb.priority ? mb.priority : 1;

  return mb.priority - ma.priority;
})

A sorting algorithm is said to be stable if two objects with equal keys appear in the same order in sorted output as they appear in the input unsorted array

So priority 1 is the same as undefined. But no, priority 1 means that middleware will be called on the end of the chain.

Oh, it's even worse because priority 1 means that middleware will be called on the end of the chain.

It's not worse, its by design, all the middlewares are priority 1 (or maybe even zero?) which is the lowest by design and will execute in the default order. If you want to prioritize a middleware simply raise it's priority.
We cannot use undefined anyway because: undefined - 1 becomes NaN. What is not good.
But when they are added as array,  we should maintain the order between middlewares with default priority as they were added.

So we go to the main problem - what is the priority of middleware without priority. Right now we can mix explicit class and glob strings in routing-controllers options.
In the code middlewares that are loaded from directories are placed after the explicit ones. So without priority option they should be called last?
But what if someone define priority -1? It should be called after the explicit, and 2 should be before? I don't know why 1 is neutral.
I have no idea what should be the order of mixed middlewares. For me neutral should be 0 and we should write it in docs.

Usually the number of  middlewares is less than the number of models and controllers, and the idea of allowing them to load then from a path, imho doesn't seem to be a good decision. If only allowed through array, the problem of priority is automatically resolved, as it could be the order of middlewares in the array, and it sounds more intuitive.

But what if someone define priority -1? It should be called after the explicit, and 2 should be before? I don't know why 1 is neutral.
I have no idea what should be the order of mixed middlewares. For me neutral should be 0 and we should write it in docs.

No we should not allow numbers below zero. We can use 0 as default, that is totally fine for me.

So we go to the main problem - what is the priority of middleware without priority.

and

and we should write it in docs.

We just defined it, all middleware without priority should default to the neutral priority. (whatever it is 1 or 0)

and the idea of allowing them to load then from a path, imho doesn't seem to be a good decision.

I totally agree with that, I would like to see them only loaded explicitly as an array. As loading order may vary between machines / os-es when loaded from a path.
While loading them from a path as a barrel export looks almost the same as loading them from a path. But they have always an explicit order.

Property keys are traversed in the following order:

First, the keys that are integer indices (what these are is explained later), in ascending numeric order.
Then, all other string keys, in the order in which they were added to the object.
Lastly, all symbol keys, in the order in which they were added to the object.

ref

So the code could be something like this:
import * as MIDDLEWARES from './middlewars';

useExpressServer(this.express, {
      authorizationChecker,
      defaultErrorHandler: false,
      middlewares: Object.keys(MIDDLEWARES).map(key => (<any>MIDDLEWARES)[key]),
      routePrefix: '',
    });

We use this right now. However this was downvoted by @19majkel94  and @pleerock before.

import * as MIDDLEWARES from './middlewars';
(...)
Object.keys(MIDDLEWARES).map(key => (<any>MIDDLEWARES)[key]),

For me it's the same as import from directories using glob string. You have no control of middlewares, you can't disable single middleware for debugging/development purposes.
BTW, Object.keys(MIDDLEWARES).map(key => (<any>MIDDLEWARES)[key]) isn't just Object.values(MIDDLEWARES)?

For me it's the same as import from directories using glob string. You have no control of middlewares, you can't disable single middleware for debugging/development purposes.

You can:
// middlewares/index.ts
// order is explicit
export * from 'x.middleware.ts';
// this is disabled
// export * from 'y.middleware.ts';
export * from 'z.middleware.ts';

BTW, Object.keys(MIDDLEWARES).map(key => (MIDDLEWARES)[key]) isn't just Object.values(MIDDLEWARES)?

Indeed it is.

I think that index file is a win-win. You have explicit priority and ability to temporarily disable selected one + clean code on initialization (useExpressServer location) - no 20+ lines with imports and then joining together in one array. I have to use this pattern in typeorm entities too 😆
One drawback I can see is that can break your unit test so you may get false negative due to error with importing sth to test.

Also we should consider accepting also object where keys implements MiddlewareInterface. So no need for Object.keys(MIDDLEWARES).map(key => (<any>MIDDLEWARES)[key]), just:
useExpressServer(this.express, {
    middlewares: MIDDLEWARES,
}

I think that index file is a win-win.

I am happy to see that you have changed your mind, I wanted to introduce this back in https://github.com/pleerock/routing-controllers/issues/131#issuecomment-301255798
So lets move forward with this! 😎

I wanted to introduce this back in #131 (comment) what was the reason back in then to not support it?

Here are the reasons:

Yeah, but we are going back to the problem - the order of middleware is undetermined, object property iteration order is not guaranteed. So we again need a decorator to configure it.

I would consider Object.keys(Middlewares).map(key => Middlewares[key]) a hack to use if u really dont care about the order (Is there even any scenario when you really dont care?), but I would consider it a bad practice what should be avoided. (Just like loading middlewares from path.)

But since you proved that string keys, in the order in which they were added to the object so we can control the order/priority in index.ts file, it's time to implement it.
I would also like to implement this feature to get rid of the need of @Middleware() decorator and setting there the type parameter. It would be better to set it in index file or import and place them in array:
createExpressServer({
    middlewares: {
        before: beforeMiddlewares, // or middlewares.before
        after: afterMiddlewares,  // or middlewares.after
        error: [
            CustomErrorMiddleware,
        ]
    }
});

so we have to map the items in array and give them descending priority values to make it works

Looks like it's not so easy:
    filterMiddlewareMetadatasForClasses(classes: Function[]): MiddlewareMetadataArgs[] {
        return this.middlewares.filter(ctrl => {
            return classes.filter(cls => ctrl.target === cls).length > 0;
        });
    }

We have to modify this part of the code to return MiddlewareMetadataArgs matching to the order of classes(middlewares). Any ideas @NoNameProvided? The only workaround is to mark the classes much earlier as the "direct from array" and then change the priority prop of MiddlewareMetadata.

Ups forgot to reply to this one. Did you figure it out? Or should I take a look as well? I have no ideas without digging in. 😄

The key is in the code pasted up here - we have to modify this part of the code to return MiddlewareMetadataArgs matching to the order of classes(middlewares). I have no idea how to make it nicely, not by dirty hacks.
However I would like to introduce loading-by-object feature with separate before and after option like described before. It would be easier to make a big refactor of this part with fix and new feature in one PR. I have your confirmation but I'm afraid pleerock is not a fan of this solution because it may require dropping support for glob string or introduce more complications in the codebase.

I have your confirmation but I'm afraid pleerock is not a fan of this solution

It's a more elegant solution, so I am sure he will see the value in it also.

We should create a separate issue for this proposal to track the discussion as this issue will be closed soon.

Yes please do that and reference back this issue.


Questions about aerodata

Hello, thank you for publishing the model, but I encountered two issues while using it:
1： May I ask how you handle the aerodynamic data of F16? I would like to change this model to a low fidelity model, which requires low fidelity data. How should I proceed;
2： When I use the trim toolbox, it always exceeds the range of aerodynamic parameters when searching for trim points, causing the model to stop working. How should I handle this?

This model doesn't have the low fidelity aerodynamics.
Advanced trim options are shown in this example: https://github.com/isrlab/F16Model.jl/blob/master/examples/example1.jl
The trim routing doesn't incorporate inequality constraints yet, so it may generate infeasible trim points. If such a constraint would be imposed, the optimization could also result in infeasibility. This means it is physically impossible to trim the aircraft at the specified configuration.

Thanks


feat: :sparkles: realse major version

BREAKING CHANGE: realse major version

:tada: This issue has been resolved in version 1.0.0 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Finalize API

Once the 3rd Milestone has been completed, we should arrive at a final form of the API. This task should involve review and input from the FEAT team.

Closing this and we'll tackle the various issues with the API step by step.


Update Resources.zh-CN.resx

Add some translation in Zh-CN

Sorry, localization will be supported in Transifex I get around to it.


ClosurePass does not play nicely with code stripping and if (!COMPILED)

Repro
var COMPILED = true;
if (!COMPILED) {
  goog.provide('foo.bar');
}

goog.provide('foo.baz');
foo.baz = function() { log(23); };
foo.baz();

compiles to
var foo;
foo.baz = function() {
  log(23);
};
foo.baz();

which is a runtime error.

To clarify, ClosurePass adds a
foo = {bar:undefined}

inside the stripped block.  But presumably we'd want to have the non-stripped call do the right thing if an earlier call is stripped?


[BUG] Add Collection to exports for ts (#3076)

Description of changes
Re-added the missing export for Collection.
I see that this type was lost when the changes were reverted in the 1.9.2 version.
I'm not sure if this was intentional or not, but I'm opening this PR anyway to start the discussion.
Test plan
How are these changes tested?

[X] Tests pass locally with pnpm run test for js

Documentation Changes
None

@andriadze, thanks for this. Looks good. Can you make a tiny change somewhere and push so that the PR title check passes.

Sure

@tazarov check it out, if necessary, I can reopen PR from a different branch with only necessary commit.


Only run call-conv-field.h test on linux

This is a temporary work around for issue #593 and this test failing on MacOS because we don't currently handle when the bindgen executable's target OS is not the same as the emitted bindings' target OS.
r? @emilio

cc @photoszzt @upsuper

@bors-servo r+
I guess

:pushpin: Commit 05c7fd5 has been approved by emilio

:sunny: Test successful - status-travis
Approved by: emilio
Pushing e30f219a1ad393370d4c2fc3a65c62a49633e29c to master...


Copy/Paste Behavior

Current Hypergrid Rules established for copy buffer.

command and control keys are ignored fixed
COPY operation copies all row selections (contiguous or not) but only the youngest region selection. We believe this is appropriate and OK as is. (Note that Excel does this for row selections; Excel only allows a single region selection to be copied.)
COPY operation gives priority to region selections over row selections even when the row selections are younger. This is not OK and needs to be fixed.

Simplest solution we arrived at for the last item above is:
bq. If there are _any_ row selections, they get copy priority regardless of when created. Otherwise, the youngest region selection is copied.

@Dwaynekj currently hypergrid does not support paste functionality.  Is this something desired?  I have implemented this locally and am wondering if this is something that I should fork over to the repo?  Probably before that though, if paste functionality is something desired, there should be a discussion on the exact specs on how it should work.  I.e.
-Should there be any type validation on pasted value?
-Should pasting be limited to editable cell?
-How to deal with unequal copy vs. paste region sizes?

Hey @noahtaylor I think the current line of thinking is that it would be a good tutorial to add to our wiki pages. In keeping in line with of HyperGrid as a grid and not a spreadsheet, we feel the core should enable the ability to create a feature like this for a developer-user to implement. Similarly with the questions you posed
Would you be open to sharing the changes you made? It might be useful as a wiki and some changes may be pertinent in HyperGrid core

@Dwaynekj I can certainly share what I did, just been busy with some high priority releases.  I can post it here in a few days unless there is a better place for it.

@noahtaylor Ok thanks!

@Dwaynekj I have created a copy and paste fiddle here:
https://jsfiddle.net/4qqzkbL3/2/
Logic is incorporated in the dom 'paste' listener.

@noahtaylor Thanks We will evaluate for 1.3.0

@noahtaylor We've decided to keep this request out of 1.3.0 based on priorities and evaluation of what layer a paste feature should be in the grid. We have it queued up for following sprint.


Error when using myst markdown notebooks and execute=="off"

If someone builds a Sphinx site with

MyST-nb installed
A MyST-markdown notebook
Sets jupyter_execute = "off"

Then we trigger a bug somewhere in jupyter_sphinx when the parsing happens. Here seem to be the relevant lines from the traceback I found:
  File "/c/Users/choldgraf/Dropbox/github/forks/python/ebp/myst-nb/myst_nb/parser.py", line 72, in parse
    path_doc = nb_output_to_disc(ntbk, document)
  File "/c/Users/choldgraf/Dropbox/github/forks/python/ebp/myst-nb/myst_nb/parser.py", line 291, in nb_output_to_disc
    write_notebook_output(ntbk, str(output_dir), doc_filename)
  File "/home/choldgraf/anaconda/envs/dev/lib/python3.8/site-packages/jupyter_sphinx/execute.py", line 259, in write_notebook_output
    ext = notebook.metadata.language_info.file_extension
  File "/home/choldgraf/anaconda/envs/dev/lib/python3.8/site-packages/ipython_genutils/ipstruct.py", line 134, in __getattr__
    raise AttributeError(key)
AttributeError: language_info

I think that it might make sense to not support this use-case, since it is strange to have a myst markdown notebook that doesn't get executed. But, perhaps we want to raise a warning instead of having this error show up.

This is handled here when using the cache (and no cache match is found): https://github.com/ExecutableBookProject/MyST-NB/blob/b750c1aaefac83bf586da90809a485fa7fd09d30/myst_nb/cache.py#L185-L191
But yes it doesn't make much sense to be using the markdown notebooks with no execution or caching, so this should be warned or raised


Allow builds to pass where test files might not exist

Occasionally, test files might not exist but this might be an intended action. Rather than have to write a shell script to manually handle these cases, it might be handy to have that support built in to the plugin itself.

It's also missing some tests :)

we worked on another solution on #182 Thanks for looking at this! 🙂


[Suggestion] Colors coding

I found that because graphviz is often merging edges (cables) into the same line , it can be difficult to see which signal is being patched where at the end.
I found that I can untangle this easiest using the color attribute (and svg text color labels) in graphviz, but perhaps it could be useful to have it the markup too?

Metropolis (Pitch) p> Braids (1v/oct) :blue

Yeah, I agree this would be a nice addition. I've been thinking about adding option arguments to the connections and comments which could be used for specific problems like that.
So, instead of :blue, it'd be something like:
Metropolis (Pitch) p> Braids (1v/oct) [color = "blue"]

Added support for colors as extra arguments: https://github.com/SpektroAudio/Patchbook/commit/89ffe26b3a5ac3270daeef9b3e6edf01dbced020


[Suggestion] Add a shop for buying items

If I understand the current shop right, it can only be used to sell items. A shop to buy items would add up nicely!

When originally designing Numismatic we specifically decided against the ability to buy items, for a variety of reasons. Primarily we failed to see much practical use. Say you're putting up a Shop which buys some item you need - how will people get aware of that? It would practically require them to constantly go around checking everyone's shops for what they're currently buying - you're much better off simply asking in chat and doing a direct exchange. That being said, we're open to discussion and if you can make a good argument for why and how this makes sense in actual gameplay please tell us and we might change out stance
Cheers

As we seem to agree here, I'll close this issue now - feel free to reopen it if you have more to say
Have a nice day


Adds the opt_context parameter to the withResolver function.

The withResolver function should accept a context object for inclusion into the constructed promise object.

Looks like build is failing on master despite this change.  Any suggestions?

Ignore it. It's a sauce labs bug.

Thanks for your interest.
The context only matter if the first argument (resolver) passed into new goog.Promise refers to this.  The resolver in withResolver only refers to local variables, so the context doesn't actually play a role here.

Hmm.  By gum you're right!  Thanks for the explanation.


Move Flank release job from Bitrise to GitHub Actions

Author the user story for this feature
As a developer on Flank, I want to move the release job to GitHub actions so I can automatically release new versions of Flank.

The Flank release job on Bitrise sometimes flakes out. Let's move all the bitrise jobs to GitHub actions. As part of migrating the release job, we should probably build a Kotlin CLI that automates the release. Then the GitHub Action will simply invoke this Kotlin CLI that has the complex release logic.
Example error:
+ jfrog bt mcs flank/maven/flank/v20.07.0
[Info] Requesting content sync...
[Error] bintray response: 404 Not Found
{
  "message": "Version 'v20.07.0' was not found"
}

Any part of the release process can fail. Maven sync is particularly flaky. The Kotlin wrapper code should be smart enough to intelligently retry on error after a delay.
Here's the bitrise job yaml:
---
format_version: '4'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
workflows:
  primary:
    steps:
    - script:
        inputs:
        - content: |-
            #!/usr/bin/env bash
            set -euxo pipefail

            curl -L https://github.com/github/hub/releases/download/v2.12.8/hub-linux-amd64-2.12.8.tgz | tar xvz
            mv hub-*/bin/hub .

            envman add --key PATH --value "`pwd`:$PATH"
        title: Install hub
    - script:
        inputs:
        - content: |-
            #!/usr/bin/env bash
            set -euxo pipefail

            hub --version
        title: Check hub version
    - activate-ssh-key:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
        title: Activate SSH key
    - git-clone: {}
    - cache-pull: {}
    - script:
        title: Set flank version.txt
        inputs:
        - content: |
            #!/usr/bin/env bash
            set -ex

            # when triggered from a tag push BITRISE_GIT_TAG will already be defined
            # if BITRISE_GIT_TAG is null (-z) then we'll use flank_snapshot
            if [[ -z "$BITRISE_GIT_TAG" ]]; then
              BITRISE_GIT_TAG=flank_snapshot
              envman add --key MVN_VERSION --value "$BITRISE_GIT_TAG"
            else
              # drop leading v for maven. v4.4 -> 4.4
              envman add --key MVN_VERSION --value "${BITRISE_GIT_TAG:1}"
            fi

            echo "$BITRISE_GIT_TAG" > ./test_runner/src/main/resources/version.txt
            envman add --key SNAPSHOT_TAG --value $BITRISE_GIT_TAG

            echo "$GIT_CLONE_COMMIT_HASH" > ./test_runner/src/main/resources/revision.txt
            envman add --key MVN_REVISION --value $GIT_CLONE_COMMIT_HASH

            # Update bugsnag
            curl https://build.bugsnag.com/ \
                --header "Content-Type: application/json" \
                --data '{
                  "apiKey": "$BUGSNAG_KEY",
                  "appVersion": "'"$GIT_CLONE_COMMIT_HASH"'",
                  "releaseStage": "production",
                  "builderName": "bitrise",
                  "sourceControl": {
                    "provider": "github",
                    "repository": "https://github.com/Flank/flank",
                    "revision": "'"$GIT_CLONE_COMMIT_HASH"'"
                  },
                  "metadata": {"bitrise_build": "'"$BITRISE_BUILD_URL"'"}
                }'
    - script:
        title: Delete old snapshot
        inputs:
        - content: |-
            #!/usr/bin/env bash
            set -x

            curl -fL https://getcli.jfrog.io | sh
            ./jfrog bt config --user $MVN_USER --key $MVN_KEY --licenses Apache-2.0
            ./jfrog bt version-delete flank/maven/flank/$MVN_VERSION --quiet

            exit 0
    - gradle-runner:
        inputs:
        - gradle_task: "-p test_runner clean build shadowJar"
        - gradlew_path: "./test_runner/gradlew"
        - cache_level: all
        title: test_runner clean build shadowJar
    - gradle-runner:
        inputs:
        - gradlew_path: "./test_runner/gradlew"
        - gradle_task: "-p test_runner bintrayUpload"
        title: Gradle bintrayUpload
    - script:
        title: Rename flank jar
        inputs:
        - content: |
            #!/usr/bin/env bash

            set -euxo pipefail

            ls -la ./test_runner/build/libs/
            mv ./test_runner/build/libs/flank.jar "$BITRISE_DEPLOY_DIR/flank.jar"

            envman add --key COMMIT_HASH --value ${GIT_CLONE_COMMIT_HASH:0:7}
    - script:
        title: Hub remove old release
        inputs:
        - content: |-
            #!/usr/bin/env bash

            set -e

            # Authorize hub
            mkdir -p ~/.config/

            cat << EOF > ~/.config/hub
            github.com:
            - user: bootstraponline
              oauth_token: $GH_TOKEN
              protocol: https
            EOF

            # Verify hub is on path
            hub --version

            # Disable error reporting because we're expecting an error.
            set +e

            hub release delete "$SNAPSHOT_TAG"

            exit 0
    - script:
        inputs:
        - content: |-
            #!/usr/bin/env bash

            # Only delete if tag is latest. Otherwise we'll go into a tag delete/trigger loop!
            if [[ "$SNAPSHOT_TAG" = "flank_snapshot" ]]; then
              curl -u bootstraponline:$GH_TOKEN -X "DELETE" "https://api.github.com/repos/Flank/flank/git/refs/tags/$SNAPSHOT_TAG"
            fi

            exit 0
        title: Remove old tag
    - script:
        run_if: enveq "SNAPSHOT_TAG" "flank_snapshot"
        title: Release - Snapshot Only
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -ex

            hub release create -p -a "$BITRISE_DEPLOY_DIR/flank.jar" -m "Flank $BITRISE_GIT_TAG" -m "Snapshot release for commit $COMMIT_HASH" "$SNAPSHOT_TAG"
    - script:
        run_if: not (enveq "SNAPSHOT_TAG" "flank_snapshot")
        title: Release - Stable Only
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -ex

            hub release create -a "$BITRISE_DEPLOY_DIR/flank.jar" -m "Flank $BITRISE_GIT_TAG" -m "Stable release for commit $COMMIT_HASH" "$SNAPSHOT_TAG"
    - script@1:
        title: Maven Central Sync
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -ex

            # Sync bintray to maven central
            jfrog bt mcs flank/maven/flank/"$SNAPSHOT_TAG"
    - cache-push:
        is_always_run: true
        inputs:
        - cache_paths: |
            $BITRISE_CACHE_DIR
            /root/.gradle
app:
  envs:
  - DONT_PUT_SECRETS_HERE: THIS_IS_A_PUBLIC_JOB
  - opts:
      is_expand: false
    SNAPSHOT_TAG: flank_snapshot
trigger_map:
- push_branch: master
  workflow: primary
- tag: v*
  workflow: primary

Steps to do in this PR

Create Empty template for each step on github action
Install GitHub hub
Check hub version
Get and set tag as environment variable
Update bugsnag
Delete old snapshot
[Gradle] Build flank (just invoke it using github actions)
[Gradle] Upload to bintray(just invoke it using github actions)
Rename flank jar
Hub remove old release
Remove old tag
12a. if snapshot version release snapshot
12b. if not snapshot version release stable
Sync bintray to maven central
Create documentation


[MODFISTO-466] New transactionType indices

Purpose
MODFISTO-466 - Make usage of an DB index for transaction type in the rollover script
Approach
Using the latest version of RMB, it is possible to use simple optimized indices with both CQL and SQL queries. The schema makes use of removeAccents, caseSensitive, sqlExpression and sqlExpressionQuery.

Updated RMB
Updated JSON serialization code to be compatible with the latest RMB (there is an issue with date serialization, see RMB-999)
Updated the schema and simplified queries
Checked that the indices are actually used:
SQL:
EXPLAIN SELECT jsonb,id FROM diku_mod_finance_storage.transaction WHERE jsonb->>'transactionType' = 'Allocation'

Index Scan using transaction_transactiontype_idx on transaction  (cost=0.15..9.98 rows=14 width=939)
  Index Cond: ((jsonb ->> 'transactionType'::text) = 'Allocation'::text)

CQL: finance-storage/transactions?query=transactionType==Allocation
EXPLAIN SELECT jsonb,id FROM diku_mod_finance_storage.transaction WHERE (jsonb->>'transactionType') LIKE 'Allocation' LIMIT 100 OFFSET 0
Limit  (cost=0.15..13.90 rows=28 width=933)
  ->  Index Scan using transaction_transactiontype_idx on transaction  (cost=0.15..13.90 rows=28 width=933)
        Index Cond: ((jsonb ->> 'transactionType'::text) = 'Allocation'::text)
        Filter: ((jsonb ->> 'transactionType'::text) ~~ 'Allocation'::text)

Used the same method for sourcePurchaseOrderId and sourcePoLineId, for consistency

Related integration tests PR
Pre-Merge Checklist:
Before merging this PR, please go through the following list and take appropriate actions.

Does this PR meet or exceed the expected quality standards?

[ ] Code coverage on new code is 80% or greater
[ ] Duplications on new code is 3% or less
[ ] There are no major code smells or security issues

Does this introduce breaking changes?

[ ] Were any API paths or methods changed, added or removed?
[ ] Were there any schema changes?
[ ] Did any of the interface versions change?
[ ] Were permissions changed, added or removed?
[ ] Are there new interface dependencies?
[ ] There are no breaking changes in this PR.

If there are breaking changes, please STOP and consider the following:

What other modules will these changes impact?
Do JIRAs exist to update the impacted modules?

[ ] If not, please create them
[ ] Do they contain the appropriate level of detail?  Which endpoints/schemas changed, etc.
[ ] Do they have all the appropriate links to blocked/related issues?

Are the JIRAs under active development?

[ ] If not, contact the project's PO and make sure they're aware of the urgency.

Do PRs exist for these changes?

[ ] If so, have they been approved?

Did you modify code to call some additional endpoints?

[ ] If so, do you check that necessary module permission added in ModuleDescriptor-template.yaml file?

Ideally, all the PRs involved in breaking changes would be merged on the same day
to avoid breaking the folio-testing environment.
Communication is paramount if that is to be achieved,
especially as the number of inter-module and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems,
ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.

The RMB-997 PR will let us use a much better solution (thanks @julianladisch). I will wait for it to be merged and rewrite this PR.

Using the new version of RMB is blocked by RMB-999.

@damien-git so now when UI for example invokes: finance-storage/transactions?query=transactionType==Allocation
RMB generates: SELECT jsonb,id FROM diku_mod_finance_storage.transaction WHERE (jsonb->>'transactionType') LIKE 'Allocation' LIMIT 100 OFFSET 0 ?
If so it will simplify queries a lot and can help to improve performance of PO Lines filtering

@SerhiiNosko

@damien-git so now when UI for example invokes: finance-storage/transactions?query=transactionType==Allocation RMB generates: SELECT jsonb,id FROM diku_mod_finance_storage.transaction WHERE (jsonb->>'transactionType') LIKE 'Allocation' LIMIT 100 OFFSET 0 ? If so it will simplify queries a lot and can help to improve performance of PO Lines filtering

Yes.


Rosalyn Code Analyzer for Code Contracts Usage

Hi Folks,
Has anyone here considered creating a Rosalyn Code Analyzer that provides rules / fixes for ensuring code contracts are being properly added / crafted to a project?

How would you define "properly" and what benefit would this have over simply observing the static checker errors?

The thing I am looking for is guidance for new developers to the project in
how to add the basic boilerplate contract specifications.
Something along the lines of: All Public Classes should have pre and post
condition checks.
Another: All classes with state should have an invariant check defined.
Another might be: All Public interfaces should be decorated with a contract
class specification attribute.
Ultimately, I would love for a new developer to be able to see these, have
quick access to a list of fixes that start them down the implementation
path towards returning contract value quickly.
On Mar 14, 2017 2:28 AM, "Yaakov"<EMAIL_ADDRESS>wrote:

How would you define "properly" and what benefit would this have over
simply observing the static checker errors?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/CodeContracts/issues/485#issuecomment-286333828,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABj7xJ60KdQCDVU6LZK7SvPNO_9Ztq6vks5rljOTgaJpZM4Mb1dp
.

You could use this as a base: https://github.com/tom-englert/ContracsReSharperInterop
It has a slightly different purpose, since it tries aligning the contracts with R# attributes, but you can get the basic idea from it how to add the contracts.

Looks like the existing static analyzer will get me 80% of the way to what I want.  I'm still interested in seeing the static analyzer converted to use Roslyn so that quick fixes can be used to quickly add suggested constraints for example that are immediately compilable for cases where full information is available (i.e. null checking).
For now the static analysis works just fine.


Remove Phone Number Verification from the Server

I don't want to share my phone number with Discord for accessing the server. It is quite irritating to try to reach mods in their DMs to get verified.

maybe you should suggest it in #support

maybe you should suggest it in #support

i wasn't verified when i wrote the issue.

skill issue. just verify your number fr it wont make you explode

skill issue. just verify your number fr it wont make you explode

I'm not interested in sharing my phone number to discord for privacy reasons.

sounds like pixel 4a grapheneos

I'm not interested in sharing my phone number to discord for privacy reasons.

womp womp, just don't get your account stolen its not that hard

I'm not interested in sharing my phone number to discord for privacy reasons.

womp womp, just don't get your account stolen its not that hard

who said anything about account getting stolen?

imo this issue should be closed, its literally pointless, verifying a phone number wont send it to cia

imo this issue should be closed, its literally pointless, verifying a phone number wont send it to cia

"I don't want to share my phone number."
That's not hard to understand.

"i don't like X that's why you should remove X from a 30k+ community"
that's not hard to understand 😕

you are paranoid for what reason? what are they going to do with it? literally nothing except remove it from your account if another account tries to use it

"i don't like X that's why you should remove X from a 30k+ community"
that's not hard to understand 😕

Bad Analogy

ok pixel 4a grapheneos

you are paranoid for what reason? what are they going to do with it? literally nothing except remove it from your account if another account tries to use it

i dont want to share my phone number, period. it is personal info and i dont want to share it. email verification is enough for the server.

how could you know if it's enough while you're literally unverified (+ you don't know how to moderate 30k+ server)

womp womp, not disabling it because we already have a spambot problem (which is most likely from compromised accounts) and disabling phone verification would make it worse
literally no one is going to see your phone number without getting access to your account, nor is discord going to even check what personal info is on said number to link it to you like its some CCP social credit, privacy schizo.

ja okej, i am closing this. im not interested in furthering this waste of time. its clear you dont care about choice or privacy.

I'm not interested in sharing my phone number to discord for privacy reasons.

i dont want to share my phone number, period.

That's great for you, but a server with 30K members and less than 30 moderators requires a legitimate account and not just some burner account anyone can make.

its clear you dont care about choice or privacy.

its clear you dont understand how moderation works ☠

I do care about freedom of choice and privacy. But I'm also a realist and you clearly aren't. I would be in the same boat as you if I didn't link my phone to my account back in 2018/2019, let alone if I didn't have friends that had numbers for my alts as well, because they've gotten phone locked before.
You're instead wasting your time arguing over the most pointless thing instead of just accepting the facts and either coping and linking your number, finding a work around or just moving on.
You're trusting a service that people heavily debate about on if your data is even being sold or not as is, yet you're going to fight volunteer contributors that take their time to develop and/or moderate a chatroom over one minute point and not even care about the bigger picture? Pathetic.
Just delete your account if you care that much about your privacy. But you won't, because you can't, because you let your friends bully you into disregarding your freedom of choice. You have no room to try and pull the "muh freedom/privacy" card when you're not being proactive with it to begin with.
 How's that for devils advocate?

I do care about freedom of choice and privacy.

You don't and I will explain why in detail below.

You're instead wasting your time arguing over the most pointless thing [...]

I already realized that and closed the thread if you bothered to read my last msg.

You're trusting a service that people heavily debate about on if your data is even being sold or not as is [...]

That's not my responsibilty. The devs have chosen to make Discord their only platform to directly communicate and install Themes & Plugins.

Just delete your account if you care that much about your privacy. But you won't, because you can't, because you let your friends bully you into disregarding your freedom of choice. You have no room to try and pull the "muh freedom/privacy" card when you're not being proactive with it to begin with.

This is just petty ignorance and presumptious behaviour. I had been away from discord, on matrix, for an year. Unfortunately devs these days think Discord is the Forums alternative and make it their primary, and in this case, only form of communication and installing Plugins & Themes. That is why I had to recreate an account. You are one of them responsible.

 How's that for devils advocate?

Again, you have chosen to host your repository on GitHub. So stop victim blaming me.
And stop continuing this thread when I have closed it and clearly said that I don't want to continue it.

womp womp

That's not my responsibilty. The devs have chosen to make Discord their only platform to directly communicate and install Themes & Plugins.

https://vd-plugins.github.io/web

I was here
Also btw just use some site like https://receive-sms-free.cc/
Ez phone verification then u can use it
Ur not gonna get special treatment bc of the precedent that sets for other users and potential malicious actors who want or try to bot the server.


Test enhancement

Changed log

It's related to issue #1.
Using install is good enough to install current dependencies.
Add the PHPUnit\Framework\TestCase namespace to be compatible with future PHPUnit version.
The php-5.5 version is deprecated. Using the php-7.1 version at least.
It also upgrades the PHPUnit version to 7.x.
The nesbot/carbon:^1.x version is deprecated since upgrading the PHP version to 7.1+.
Using the nesbot/carbon:^2.x version instead.

This is brilliant! I'm going to have a look into how this impacts a couple of projects that are using it, but after that I'm happy to merge it, thank you so much!

This is brilliant! I'm going to have a look into how this impacts a couple of projects that are using it, but after that I'm happy to merge it, thank you so much!

@BrunoDeBarros, thanks. If having any suggestions, please feel free to write some comments on that PR.


NameError when Class Stats w/checked in students

global name 'date' is not defined

Also happens when you are a parent and try to look at dojo


TRELLO#152 - make sure container runs after docker restart

10x a LOT Vinny for taking care of this :)


Delete-Button doesn't work when currency symbol is at the end

Hi, I like your package and would love to use it. Unfortunately it doesn't properly work at the moment, when the currency symbol is positioned at the end. For example in Germany the currency is formatted as '25.000,00 €', which is correct. But then the delete key doesn't work anymore.

@drbizeps Thank you for the issue. Let me check :)

@drbizeps Please use 0.3.0 version. I just published after fixing this issue :)

Thank you so much for the quick response and fix. It works wonderfully now.


wlr/taskbar: Missing icons for signal-desktop and gnome-terminal

Hi,
when running wayland --log-level trace it can be observed, that for Signal (signal-desktop) and the Gnome Terminal (gnome-terminal which spawns gnome-terminal-server) no icons can be found.
[2020-11-24 09:05:53.307] [debug] Couldn't find icon for Signal

For both applications, icons are defined in their respective .desktop file and they are also available on my system under /usr/share/icons.
❯ grep -i icon /usr/share/applications/signal-desktop.desktop
Icon=signal-desktop

❯ find /usr/share/icons -iname "*"signal-desktop"*"
/usr/share/icons/hicolor/128x128/apps/signal-desktop.png
/usr/share/icons/hicolor/16x16/apps/signal-desktop.png
/usr/share/icons/hicolor/24x24/apps/signal-desktop.png
/usr/share/icons/hicolor/256x256/apps/signal-desktop.png
/usr/share/icons/hicolor/32x32/apps/signal-desktop.png
/usr/share/icons/hicolor/48x48/apps/signal-desktop.png
/usr/share/icons/hicolor/512x512/apps/signal-desktop.png
/usr/share/icons/hicolor/64x64/apps/signal-desktop.png
/usr/share/icons/hicolor/1024x1024/apps/signal-desktop.png
/usr/share/icons/Papirus/16x16/apps/signal-desktop-beta.svg
/usr/share/icons/Papirus/16x16/apps/signal-desktop.svg
/usr/share/icons/Papirus/22x22/apps/signal-desktop-beta.svg
/usr/share/icons/Papirus/22x22/apps/signal-desktop.svg
/usr/share/icons/Papirus/24x24/apps/signal-desktop-beta.svg
/usr/share/icons/Papirus/24x24/apps/signal-desktop.svg
/usr/share/icons/Papirus/32x32/apps/signal-desktop-beta.svg
/usr/share/icons/Papirus/32x32/apps/signal-desktop.svg
/usr/share/icons/Papirus/48x48/apps/signal-desktop-beta.svg
/usr/share/icons/Papirus/48x48/apps/signal-desktop.svg
/usr/share/icons/Papirus/64x64/apps/signal-desktop-beta.svg
/usr/share/icons/Papirus/64x64/apps/signal-desktop.svg

I also tried changing the used icon theme in the wlr/taskbar settings in the waybar config without success. Using the latest waybar-git (Archlinux AUR).
Please let me know if I can provide more information to pinpoint the issue.
Thank you very much.

I just installed the icon theme Numix Circle as in the waybar taskbar manpage shown and added "icon-theme": "Numix-Circle" to my waybar config.
Now for signal-desktop an icon is shown in the taskbar, but still not for gnome-terminal.

The problem is probably, that the app doesn't provide the correct app-id which is used to find the icon. Unfortunately, this is nothing that I can solve within the plugin. I only get the information that the compositor provides to me via the foreign-toplevel-manager protocol.

I tested four programs (Zoom, Thunderbird, Firefox, GNOME Terminal) and it looks like this ("format": "{icon} {app_id}"):

And here are the app IDs as found in swaymsg -t get_tree and the location of the .desktop files:

Program
App ID
.desktop File

Zoom
"zoom"
/usr/share/applications/Zoom.desktop

Thunderbird
null
/usr/share/applications/mozilla-thunderbird.desktop

Firefox
null
/usr/share/applications/firefox.desktop

GNOME Terminal
"gnome-terminal-server"
/usr/share/applications/org.gnome.Terminal.desktop

So it works if app id is null, but not if it is set to some (wrong?) value.

I tested four programs (Zoom, Thunderbird, Firefox, GNOME Terminal) and it looks like this ("format": "{icon} {app_id}"):

And here are the app IDs as found in swaymsg -t get_tree and the location of the .desktop files:

Program
App ID
.desktop File

Zoom
"zoom"
/usr/share/applications/Zoom.desktop

Thunderbird
null
/usr/share/applications/mozilla-thunderbird.desktop

Firefox
null
/usr/share/applications/firefox.desktop

GNOME Terminal
"gnome-terminal-server"
/usr/share/applications/org.gnome.Terminal.desktop

So it works if app id is null, but not if it is set to some (wrong?) value.

Firefox sets app_id when using the Wayland backend (ie when MOZ_ENABLE_WAYLAND) is set, but I see an icon in wlr/taskbar. Curiously, for Firefox Nightly, which also sets app_id to "firefox" as mainline Firefox does, I see the mainline Firefox icon only if I have mainline Firefox installed. If I uninstall mainline Firefox, Firefox Nightly has no icon.
Here's my table:

Program
app_id
icon name set in .desktop file
Icon in hicolor folder?
Icon in pixmaps folder?
Icon in wlr/taskbar?

Firefox (Wayland mode)
firefox
firefox
yes
no
yes

Firefox (X11 mode)
null
firefox
yes
no
yes

Firefox Nightly
firefox
firefox-nightly
yes
no
shows mainline Firefox icon instead, if mainline Firefox is installed

Thunderbird
thunderbird
thunderbird
yes
no
yes

Telegram
telegramdesktop
telegram
yes
no
yes

Signal
null
signal-desktop
yes
no
no

Zoom
zoom
Zoom
no
yes
no

Discord
null
discord
no
yes
yes

Alacritty
Alacritty
Alacritty
no
yes
yes

waybar -l trace doesn't show any detail beyond "Couldn't find icon for <app>".

There were some recent changes regarding the icon finding code. Can you try with the latest master branch?

With the latest master branch the icons for Signal and Zoom are now found but the icon for gnome-terminal still isn't.

I was able to get the gnome-terminal icon by adding this app_ids-mapping:
"gnome-terminal-server": "org.gnome.Terminal"


Generating C# wrapper functionality for Datasmith

C# wrapper generation when running USharpGen modules errors when Datasmith plugins from Epic are enabled. Probably low on the to-do list as it's an additional Epic plugin however you may want to consider for any users utilising these Unreal Studio plugins.
Workaround is not to use datasmith with USharp!

Yea there needs to be a way of blacklisting / whitelisting modules. Maybe I'll change the USharpGen modules command to only generate code for a predefined whitelist and then add an additional command USharpGen allmodules or something to generate it everything.

Yeah that's a good idea. I think having a simple text file where you could blacklist files would be great. Similar to the text file for USharp packaging.

Whitelisting/blacklisting would be ideal as that would give a good workaround for working with any custom plugins.

Added whitelist support in https://github.com/pixeltris/USharp/commit/e055d283337a7a5c46126d2e4340919427bd31e9. The currently whitelisted modules can be found here


Missing documentation and UI color for FAILED_SUCCEEDED

job.succeed.on.failure=true allows continuing the flow execution over to children of a job even if it failed.
This is a really useful feature and should be documented.
It works! But it's missing the UI color (so uses the black/graphite default color in the graph view):

Mouse-over:

Worse for Job List, because it's just blank, you might not notice that this job didn't succeed:

Finally, in my opinion the eventual flow status should also be marked to be FAILED_SUCCEEDED if any of the executed jobs are. For the flow status, FAILED_SUCCEEDED should only override SUCCEEDED, though. For example FAILED and KILLED would still override FAILED_SUCCEEDED as the flow status.
Also it would be great that even when job.succeed.on.failure=true, the retries would applied first before giving up with the job as FAILED_SUCCEEDED. I think that would be a good default – what do you say? It could be possible to override it with job.succeed.on.failure.retries=${retries} (<- that would be the same as the new default behavior), for example.
I'm willing to fix these issues – please advise, do you agree with my suggestions?

I have thought about job.succeed.on.failure=true in some case.
for example, although job A doesn't depend on job B, I want to execute A after B to avoid high load average.
In this case, this setting is useful.
but, if job A fails, the eventual flow status become to be SUCCEEDED.
In my opinion the eventual flow status should not be marked to be SUCCEEDED.
Anyway, job.succeed.on.failure option should be documented.
Thanks

@juhoautio Thanks for the suggestion.
We are thinking about introducing a more general form: conditional flow in the future. When we do, this will likely be a special case and we may remove this config from the code. So I would hesitate to document it now.

Ok. Can we add the missing color though? What about allowing retries before proceeding?
For the upcoming conditional execution feature, would it be possible to consider optional retries?

We don't plan to fix the missing color. However, if you submit a PR, we will review it when someone has the bandwidth to do so.
What do you mean by "retries"?
My current thinking is that standard retry will still be applied before the conditional flow logic is applied.

What do you mean by "retries"?

The usual retry mechanism. If I set for example retries=3 in the job props. Currently the retries are not applied if job.succeed.on.failure=true. I would like to change this, or at least allow by configuration to use all the retries before giving up and marking the job as FAILED_SUCCEEDED.

My current thinking is that standard retry will still be applied before the conditional flow logic is applied.

Yeah, that sounds good to me!

I added this "List of issues" in the description:

Document job.succeed.on.failure
Add UI colors for FAILED_SUCCEEDED: Pull Request https://github.com/azkaban/azkaban/pull/1483
When a flow finishes, set flow status to FAILED_SUCCEEDED instead of SUCCEEDED if any jobs finished with FAILED_SUCCEEDED status
Apply failure HTTP Job Callback also in case of FAILED_SUCCEEDED
Send failure.emails also if flow finishes as FAILED_SUCCEEDED
Apply all possible retries attempts before ending the job as FAILED_SUCCEEDED

Which of these you would accept if pull request are made?

Since you have done the work, we can review 2.


Sort the download archive for better performance

My YTDL archive is quite large:
$ wc -l ytdl_archive.txt
76923 ytdl_archive.txt

I have noticed that performance for "is the video in the archive?" checking becomes slow quickly, even if only 100 more video lines were added to an already-sorted archive, but a quick command-line sort of the archive results in a massive performance boost:
$ sort < ytdl_archive.txt > xxx && mv xxx ytdl_archive.txt

I would suggest that for any batch (channel, playlist, etc.) download that also uses the archive and adds at least one line to the archive, sort the archive at the end of the batch to maintain performance for future instances that use that archive. It may also be good to add an option to disable this post-batch archive sorting for anyone who also uses the archive as a record of the original order of downloads.

Sure shouldn't be a problem to add some sorting support. However I would rather not have this on by default. Some custom command like --auto-sort-archive or so should trigger that.
I don't have the time to implement this myself. Maybe someone else is willing to if you aren't able to implement it yourself which is totally fine.
Will let this open for now and maybe close it in a week or so but appending the Future tag to it.

Here's a better question: why is the performance sensitive to the sort order of the archive text file in the first place?

No clue. Probably some naive algorithm.
Actually found the lines
https://github.com/blackjack4494/youtube-dlc/blob/7ac0ba50ce2e60f9105f94f1c66e7d8fa9b6b692/youtube_dlc/YoutubeDL.py#L2136-L2153
This will take quite some time especially the more videos are added. Should be fine for maybe a few thousand videos. But starting with 10k+ it's going to be hell.
Sorting will not really help. It is just luck in your case that the video got found earlier.
What really is needed would be some advanced searching and sorting algorithm.  For bigger archives indexing would be quite benificial as well.
Maybe this can be skipped and some database could be used that handles such things (but speaking of really heavy users here).
I wonder if we can find some programmers. Doesn't even have to be in python directly (can be ported later if it's not some sketchy language or  special javascript).

OK, I just looked at the code and I know what's going on now. There are two aspects to this issue:

The archive file is re-opened and re-scanned for every single individual video, which is massively inefficient but allows multiple simultaneous invocations of the program to share an archive, and
New files are appended to the end of the archive file, so scanning the archive for more recent downloads requires consumption of the entire archive before finding the desired string

There is not any sort of locking going on with the archive, and my experience trying to run two instances over the same playlist has been ugly, so I'd propose the following:

Preload the archive at program invocation
Append to the archive as usual, but maintain an internal tree of video keys instead of scanning the file every time, and add to the tree when appending a newly downloaded video to the archive
Officially consider running multiple instances over the same channel/playlist/etc. at the same time to be unsupported and at the user's own risk

This solves the problem, makes archive checks insanely faster, and no sorting of the archive file itself is necessary.
I'll work on this and make a PR if you think that sounds OK.

I'm working on this now. I have it working nicely so far, except it turns out that by sorting the archive file, I created the worst-case scenario for a binary search tree. It's bad because it loads so slowly with a sorted list that it looks like it has hung, but it's good because I can fix the problem using a weight-balanced tree.

PR #125 generated to fix this. Tested against a new non-existent archive and archives of line count 1, 2, and >70K, and against the 70K data in both randomized and sorted orders. Everything seems to work great. Please feel free to squash and merge.


Search nested properties?

Thanks for elasticlunr.js — much appreciated! FWIW I've done an offline search demo at simpl.info/search/lunr.
Is it possible to search for nested properties, for an object like the following?
{
  name: "foo",
  properties: {
    a: "bar",
    b: "baz"
  }
}

I would love to know if you guys made any progress on this. I also might need to flatten the documents as well. Any response would be appreciated!

I am in the same boat. Did anyone get anywhere with this?


Add Section for @call

This patch adds a small section regarding the @call builtin.
Closes #7

I think this has gone pretty stale and I'm sure there would be a few merge conflicts. I'm going to close it but if anyone else wants to pick this up, feel free.