"Multiple widgets used the same GlobalKey" crash

If I use a Navigator as a child of a TabBarView, and that Navigator uses a GlobalKey, then there is a situation where Element.updateChild is called, and this causes a spurious assert that
Multiple widgets used the same GlobalKey".

Here is some code that demonstrates the problem. Run the following app, and after it starts up, hit tab "C" to see the error.
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

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

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

class _MyHomePageState extends State<MyHomePage> {
  GlobalKey globalKeyA = GlobalKey(debugLabel: 'A');

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: DefaultTabController(
        length: 3,
        child: Scaffold(
          appBar: AppBar(
            title: Text(widget.title),
          ),
          body: TabBarView(
            children: [
              Navigator(
                key: globalKeyA,
                onGenerateRoute: (_) =>
                  MaterialPageRoute(
                    settings: RouteSettings(
                      isInitialRoute: true
                    ),
                    builder: (context) => Text('Page A'),
                  )
              ),
              Text('Page B'),
              Text('Page C'),

            ]
          ),
          bottomNavigationBar: TabBar(
            labelColor: Colors.black,
            tabs: [
              Tab(text: 'A'),
              Tab(text: 'B'),
              Tab(text: 'C')
            ]
          ),
        )
      )
    );
  }
}

The error is:
flutter: #2      Element.updateChild.<anonymous closure> (package:flutter/src/widgets/framework.dart:2724:13)
flutter: #3      Element.updateChild (package:flutter/src/widgets/framework.dart:2727:6)
flutter: #4      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4838:14)
flutter: #5      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
flutter: #6      Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
flutter: #7      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4838:14)
(etc...)

The problem is that in Element.updateChild, the code checks that a GlobalKey is not being reused by a different widget. But this check occurs before the old child widget has had a chance to be deactivated, so it is unsurprising that the GlobalKey appears to be used twice.
This will always happen when an Element that uses a GlobalKey has updateChild called.
The fix would be to move the assertion that checks that the GlobalKey is not reused to be later in the updateChild method, after the original has been deactivated.
--- a/packages/flutter/lib/src/widgets/framework.dart
+++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -2705,18 +2705,12 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
   /// |  **child != null**  |  Old child is removed, returns null. | Old child updated if possible, returns child or new [Element]. |
   @protected
   Element updateChild(Element child, Widget newWidget, dynamic newSlot) {
-    assert(() {
-      if (newWidget != null && newWidget.key is GlobalKey) {
-        final GlobalKey key = newWidget.key;
-        key._debugReserveFor(this);
-      }
-      return true;
-    }());
     if (newWidget == null) {
       if (child != null)
         deactivateChild(child);
       return null;
     }
+
     if (child != null) {
       if (child.widget == newWidget) {
         if (child.slot != newSlot)
@@ -2737,6 +2731,13 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
       deactivateChild(child);
       assert(child._parent == null);
     }
+    assert(() {
+      if (newWidget.key is GlobalKey) {
+        final GlobalKey key = newWidget.key;
+        key._debugReserveFor(this);
+      }
+      return true;
+    }());
     return inflateWidget(newWidget, newSlot);
   }

It's okay to move the assert to the end, because it cannot possibly trigger on the other code paths.
Either newWidget == null, so it can't have a GlobalKey anyway. Or child.widget == newWidget so the GlobalKey is already being used by the child. Or (see code below), Widget.canUpdate(child.widget, newWidget) is true, which means that child.widget.key == newWidget.key, according to the rules of being allowed to replace a widget.
      if (Widget.canUpdate(child.widget, newWidget)) {
        if (child.slot != newSlot)
          updateSlotForChild(child, newSlot);
        child.update(newWidget);
        assert(child.widget == newWidget);
        assert(() {
          child.owner._debugElementWasRebuilt(child);
          return true;
        }());
        return child;
      }

Therefore, the only place that needs to have the assert to check we're not using a GlobalKey more than once, is near the end of this method.
See also:
https://github.com/flutter/flutter/issues/16630
https://github.com/flutter/flutter/issues/21630
https://stackoverflow.com/questions/49862572/multiple-widgets-used-the-same-globalkey?rq=1
$ flutter doctor -v
[✓] Flutter (Channel master, v0.11.10-pre.2, on Mac OS X 10.13.6 17G3025, locale en-GB)
    • Flutter version 0.11.10-pre.2 at /Users/steve/code/flutter
    • Framework revision b55e52c6f7 (18 hours ago), 2018-11-21 15:48:23 -0500
    • Engine revision 1e37b99ac0
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at /Users/steve/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ Verify that all connected devices have been paired with this computer in Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

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

[✓] Connected device (1 available)
    • iPhone XR • 1EE1625B-61BB-421E-B104-CB3C8A5B6076 • ios • iOS 12.1 (simulator)

! Doctor found issues in 1 category.

Please see https://github.com/flutter/flutter/pull/24661 for a minimal PR that fixes this as described above.

I'll add that I've been maintaining a fork of Flutter with this change in, as it crashes the app I'm working on when working on it in debug mode.

Okay, I've given up on that particular PR. After looking in the framework tests, it's clear to me that I don't understand enough about what's going on to know how to fix this.
One other thing I'll mention: When I run the small example app that I pasted into the original comment, and choose tab "c", this is the error I get:
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building NotificationListener<KeepAliveNotification>:
flutter: Multiple widgets used the same GlobalKey.
flutter: The key [GlobalKey#dee47 A] was used by multiple widgets. The parents of those widgets were:
flutter: - RepaintBoundary-[<[GlobalKey#dee47 A]>](renderObject: RenderRepaintBoundary#8654c DETACHED)
flutter: - RepaintBoundary-[<[GlobalKey#dee47 A]>](renderObject: RenderRepaintBoundary#af862 NEEDS-LAYOUT
flutter:   NEEDS-PAINT)
flutter: A GlobalKey can only be specified on one widget at a time in the widget tree.
flutter:

This suggests to me that there are two renderObjects that are attached to the same GlobalKey. But one is in a DETACHED state.
Question: should Flutter be counting DETACHED widgets when checking whether there is a GlobalKey collision?

I tested it a bit further. This is actually a real problem.
The root of the issue is because TabBarView does some black magic with its children on jump animation.
There's an easy fix for the GlobalKey issue:
Modify the setState inside _warpToCurrentIndex to :
    setState(() {
      _warpUnderwayCount += 1;
      _children = List<Widget>.from(widget.children, growable: false);
      if (_currentIndex > previousIndex) {
        final tmp = _children[_currentIndex - 1];
        _children[_currentIndex - 1] = _children[previousIndex];
        _children[previousIndex] = tmp;
        initialPage = _currentIndex - 1;
      } else {
        final tmp = _children[_currentIndex + 1];
        _children[_currentIndex + 1] = _children[previousIndex];
        _children[previousIndex] = tmp;
        initialPage = _currentIndex + 1;
      }
    });

But it's only a partial fix.
The children black magic doesn't simply break GlobalKey, it also breaks KeepAlive, and this issue doesn't even come close to solving it.
To begin with, reordering its children internally for animation purpose it a bad idea. A refactor may be needed

@rrousselGit and @xqwzts helped debug this on the Flutter Study Group slack.
The actual problem is in _warpToCurrentIndex of _TabBarViewState.
What happens is that during an animation, the _TabBarViewState manipulates its list of children to put the previous index child next to the child we're animating to. It only does this when there are one or more intervening tabs, to give the illusion of warping between tabs, but without showing intermediate tabs. So, if tabs are A -> B -> C, going from tab A to tab C would animate directly A to C, without showing B zipping by in between.
To achieve this, the code does as follows:
    final int previousIndex = _controller.previousIndex;
    if ((_currentIndex - previousIndex).abs() == 1)
      return _pageController.animateToPage(_currentIndex, duration: kTabScrollDuration, curve: Curves.ease);

    assert((_currentIndex - previousIndex).abs() > 1);
    int initialPage;
    setState(() {
      _warpUnderwayCount += 1;
      _children = List<Widget>.from(widget.children, growable: false);
      if (_currentIndex > previousIndex) {
        _children[_currentIndex - 1] = _children[previousIndex];
        initialPage = _currentIndex - 1;
      } else {
        _children[_currentIndex + 1] = _children[previousIndex];
        initialPage = _currentIndex + 1;
      }
    });

The problem with this is that the child at previousIndex now appears in _children in two places — in the original place, and in _currentIndex ± 1. And, if the element at previousIndex is associated with a GlobalKey then it will be a duplicated GlobalKey, and fall foul of the checks for this.
A solution is to make the list manipulations actually swap elements, rather than duplicating an element.

An example for the KeepAlive problem:
Consider this KeepAlive widget that basically stores the parameter it receives into a State:
class Custom extends StatefulWidget {
  final int value;

  const Custom(this.value, {Key key}) : super(key: key);

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

class _CustomState extends State<Custom> with AutomaticKeepAliveClientMixin {
  int value;

  @override
  void initState() {
    print('init state ${widget.value}');
    super.initState();
    value = widget.value;
  }

  @override
  Widget build(BuildContext context) {
    print(value);
    return Text(value.toString());
  }

  @override
  bool get wantKeepAlive => true;
}

Then when using it with TabBarView this way:
TabBarView(children: [
  Custom(1),
  Custom(2),
  Custom(3),
]),

And do the following:

Jump from first to last page without passing by the second page
Go to the second page

Then the second page will display 1 instead of 2.

@rrousselGit Thinking about the keepalive problem — is this actually a problem?
What I mean is, it's a usual thing in Flutter to need to add keys to the children of a Widget, when the Widget might swap those children around or replace child Widgets with other ones of the same type.
Perhaps what's happening here is a case of that — arguably an inelegant or unexpected case, where it's not obvious to the user of a TabBarView that it will be swapping children around.
If that's so, the normal solution of adding keys to children would apply. What do  you think?

What I mean is, it's a usual thing in Flutter to need to add keys to the children of a Widget, when the Widget might swap those children around or replace child Widgets with other ones of the same type.

Good point. But then Flutter should make keys required like with Dismissible or similar widgets, which contains an assert to do that check.
But that'd be quite a big breaking change, and inconsistent with things like PageView or ListView which don't require them.

@ArpanKIIT2017 I think this is the same problem — although you're not using the same GlobalKey, the code inside TabView that shuffles around the tabs behind the scenes is causing the problem. For an instant, it allows the same child to exist in multiple places in the list of children. If this child has a GlobalKey, then you'll get this problem where duplicate GlobalKeys are detected.
You can try my PR to fix this: https://github.com/flutter/flutter/pull/24821
Unfortunately, the PR hasn't had any attention from the Flutter team, but perhaps you can vote for it or something, to try and get it moved forward.

I am also facing same problem from this code:
`Widget build(BuildContext context) {
return new Scaffold(
key: _homeScaffoldKey,
body: new TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
new page1(),
new page2(),
new page3(),
new page4(),
],
controller: tabController,
),
bottomNavigationBar: new Material(
color: Colors.blue,
child: new TabBar(
isScrollable: true,
indicatorColor: Color.fromRGBO(255, 25, 255, 0.0),
controller: tabController,
tabs: [
new Tab(
icon: new Icon(Icons.accessibility),
),
new Tab(
icon: new Icon(Icons.accessibility),
),
new Tab(
icon: new Icon(Icons.accessibility),
),
new Tab(
new Icon(Icons.accessibility),
),
],
),
),
);
}`
I am getting Multiple widgets used the same GlobalKey
Is this issue still exists? Is there any solution for this?

@sabbir420 I think this will depend what page1(), page2() etc. are doing. Do they use GlobalKeys?
If so, this may be the problem that is fixed by the Pull Request I referenced above: https://github.com/flutter/flutter/pull/24821

@SteveAlexander Yes. They are using GlobalKeys. LIke this
   final GlobalKey<ScaffoldState> _homeScaffoldKey = new GlobalKey<ScaffoldState>();
   return new Scaffold(         key: _homeScaffoldKey,      );
in that code _homeScaffoldKey is GlobalKey.

@sabbir420 ok — if you're able to, please try it with my PR applied, and let me know if it fixes the problem for you. Let me know if you need help doing that.

@sabbir420 Can you paste here the stacktrace you get when the problem occurs?

@SteveAlexander Here is stacktrace:
  I/flutter (12259): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter (12259): The following NoSuchMethodError was thrown while finalizing the widget tree: I/flutter (12259): The method 'dispose' was called on null.  I/flutter (12259): Another exception was thrown: Multiple widgets used the same GlobalKey. I/flutter (12259): Another exception was thrown: NoSuchMethodError: The method 'dispose' was called on null.

@sabbir420 Thanks for the stack trace. It says that the error is in package:columbus_app/ui/favorite/fav.dart.
The Another exception was thrown: Multiple widgets used the same GlobalKey. error follows this — but it's hard to say what caused the GlobalKey issue because it might have been caused by the initial error.
So, I don't think you're dealing with the same situation here — I think there's something else going on in your code, probably in "columbus_app".

@SteveAlexander Actually I was using TabBar  in bottom navigation bar. TabBar  have TabBarView(). So, before it was like this in TabBarView():
  physics: new ScrollPhysics(parent: null),
It's working fine. There was no error.
But it enable the swapping among tabs. So, I want to disable the swapping. It should work only on tap. So, to disable the swapping I used like this:
  physics: new NeverScrollableScrollPhysics(),
When I used this, then it showed this error. Suppose there are four tabs. If you go 1 number tab to 2nd number tab, like this 2-3, 3-4, 4-3,3-2,2-1 then it works fine. But if you go 3 number tab to 1 number tab then it shows this error.

@SteveAlexander Thank you for your advice. I solved that issue.

@sabbir420 ok — if you're able to, please try it with my PR applied, and let me know if it fixes the problem for you. Let me know if you need help doing that.

@SteveAlexander Thanks, Steve! Your PR #24821 worked for me. I have a TabBarView w/ 3 widgets, each one with a GlobalKey; it was crashing due to the #24660 issue. Now, it jumps from A to C right away.
One question, if you don't mind: will I have to redo this "hack" every time I upgrade Flutter?

Newbie problem.. but same issue I think..
I got three tabs created and comprising as

Detail Form = works
Items ListView = works
Extra Detail Form = Creating and adding another form  failed...

Multiple widgets used the same GlobalKey

offending lines
GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
GlobalKey<FormState> _detailFormKey = new GlobalKey<FormState>();
// below creates kCrAsh
GlobalKey<FormState> _xdetailFormKey = new GlobalKey<FormState>();
`

@pedromorgan , are you using Tabs? If you are, maybe SteveAlexander's workaround work; it did for me...
It's hard to say without more details...

Am a newbie 2 fllutter..
What i expect to happen is that u got 2 forms..
But cannot do in same tree..
As above the seconnd FormState "creation" doth crash..
This is a problem and a kinda show stopper

Why cant' we have auto keys ?

@sabbir420

Thanks, Steve! Your PR #24821 worked for me. I have a TabBarView w/ 3 widgets, each one with a GlobalKey; it was crashing due to the #24660 issue. Now, it jumps from A to C right away.

That's great. Would you mind adding a comment to the PR to mention that this works for you? That might help get it towards being reviewed by the Flutter team.

One question, if you don't mind: will I have to redo this "hack" every time I upgrade Flutter?

Until it gets merged into Flutter, yes you'll need to reapply the patch every time.

This issue will be fixed as part of https://github.com/flutter/flutter/issues/25807

I'm having the same problem of 'Multiple widgets used the same GlobalKey', but I think mine is in a different situation.
I have several forms that are used to type in user data when signing up a new user. For each page I'm using a different StatefulWidget, each with its own form and GlobalKey() key. From the first page which has a form in it, I navigate to a StatelessWidget which only shows the information typed in the page before and request confirmation from the user that the info input is correct. After that, I navigate to two other StatefulWidgets that have forms in them.
To declare each form key I'm using these commands, one in each StatefulWidget, in its own file:

static final _personalDataFormKey = GlobalKey();
no key necessary;
static final GlobalKey _passwordFormKey = GlobalKey();
static final GlobalKey _contactInfoFormKey =
GlobalKey();

I navigate using the following commands:

Navigator.of(context).popAndPushNamed('/sing_up_personal_data_confirmation');
At the StatelessWidget with no Form and Key, i use the command Navigator.of(context).popAndPushNamed('/sign_up_password');
Navigator.of(context).popAndPushNamed('/sign_up_contact_info');
it breaks here before continuing;
Navigator.of(context).popAndPushNamed('/sign_up_confirmation'); this last StatefulWidget still loads, but I get the error message before it loads.

This is the output I get in the console:
Launching lib/main.dart on iPhone Xʀ in debug mode... Running Xcode build... Xcode build done.                                           14,0s Syncing files to device iPhone Xʀ... flutter: ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ flutter: The following assertion was thrown during a scheduler callback: flutter: 'package:flutter/src/semantics/semantics.dart': Failed assertion: line 2446 pos 16: 'node.parent == flutter: null || !node.parent.isPartOfNodeMerging || node.isMergedIntoParent': is not true. flutter: flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially flutter: more information in this error message to help you determine and fix the underlying cause. flutter: In either case, please report this assertion by filing a bug on GitHub: flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md flutter: flutter: When the exception was thrown, this was the stack: flutter: #2      SemanticsOwner.sendSemanticsUpdate (package:flutter/src/semantics/semantics.dart:2446:16) flutter: #3      PipelineOwner.flushSemantics (package:flutter/src/rendering/object.dart:951:23) flutter: #4      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:333:19) flutter: #5      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:701:13) flutter: #6      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:268:5) flutter: #7      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:988:15) flutter: #8      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:928:9) flutter: #9      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:840:5) flutter: #13     _invoke (dart:ui/hooks.dart:209:10) flutter: #14     _drawFrame (dart:ui/hooks.dart:168:3) flutter: (elided 5 frames from class _AssertionError and package dart:async) flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════ flutter: Another exception was thrown: Multiple widgets used the same GlobalKey. flutter: Another exception was thrown: 'package:flutter/src/semantics/semantics.dart': Failed assertion: line 2446 pos 16: 'node.parent == null || !node.parent.isPartOfNodeMerging || node.isMergedIntoParent': is not true.
I'm stuck with this and have no idea what to do to solve it. I don't know if I'm doing something wrong, but I'm under the impression I'm declaring and using the keys correctly.
If more code details are necessary, I'll gladly supply.
Thanks in advance for your help!

@Luciano-Pinto
It sounds like a different issue, the "Multiple widgets used the same GlobalKey" error might be the consequence of the first exception. It will be helpful if you can create a new issue with the exception you have here and a fully runnable example. Feel free to ping me in the new issue you create.

@Luciano-Pinto
It sounds like a different issue, the "Multiple widgets used the same GlobalKey" error might be the consequence of the first exception. It will be helpful if you can create a new issue with the exception you have here and a fully runnable example. Feel free to ping me in the new issue you create.

Thanks! Will do!

changes got reverted

@chunhtai was this fixed? If so, in which release? I'm still getting this error on the latest beta release (1.5.4-hotfix.2)

I've also tried with the latest dev version (1.6.3) and get the same error.

@smkhalsa it should be fixed already. If you can provide the error message along with the minimum reproducible code, it will be easier for us to investigate it

@smkhalsa it should be fixed already. If you can provide the error message along with the minimum reproducible code, it will be easier for us to investigate it

I'm seeing the same (or a very similar) issue with the latest version of flutter. It happens when I hit                                   Navigator.pushNamed(context, '/'); below.
Code:
`class LoginPage extends StatelessWidget {
final GlobalKey formKey = GlobalKey();
@override
Widget build(BuildContext context) {
String email, password;
return ChangeNotifierProvider(
builder: (context) => LoginModel(ViewState.Idle),
child: Consumer(
builder: (context, model, child) => Scaffold(
appBar: AppBar(
title: Text("Sign in"),
),
body: Form(
key: formKey,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextFormField(
validator: (input) {
if (input.isEmpty) {
return "Email required";
}
},
onSaved: (input) => email = input,
decoration: InputDecoration(labelText: 'Email'),
),
TextFormField(
validator: (input) {
if (input.isEmpty) {
return "Password required";
}
},
onSaved: (input) => password = input,
decoration: InputDecoration(labelText: 'Password'),
obscureText: true,
),
model.state == ViewState.Loading
? CircularProgressIndicator()
: RaisedButton(
onPressed: () async {
if (formKey.currentState.validate()) {
formKey.currentState.save();
bool success = await model.login(email, password);
if (success) {
Navigator.pushNamed(context, '/');
}
}
},
child: Text('Sign in'),
),
if (model.state == ViewState.Error)
Center(
child: Text(model.apiErrorMessage)
)
],
)),
)));
}
}`
Logs:
I/flutter ( 2399): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter ( 2399): The following assertion was thrown building MediaQuery(MediaQueryData(size: Size(411.4, 683.4), I/flutter ( 2399): devicePixelRatio: 2.6, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: I/flutter ( 2399): EdgeInsets.zero, viewInsets: EdgeInsets.zero, alwaysUse24HourFormat: false, accessibleNavigation: I/flutter ( 2399): falsedisableAnimations: falseinvertColors: falseboldText: false)): I/flutter ( 2399): Multiple widgets used the same GlobalKey. I/flutter ( 2399): The key [LabeledGlobalKey<FormState>#64091] was used by multiple widgets. The parents of those I/flutter ( 2399): widgets were different widgets that both had the following description: I/flutter ( 2399):   MediaQuery(MediaQueryData(size: Size(411.4, 683.4), devicePixelRatio: 2.6, textScaleFactor: 1.0, I/flutter ( 2399):   platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, I/flutter ( 2399):   alwaysUse24HourFormat: false, accessibleNavigation: falsedisableAnimations: falseinvertColors: I/flutter ( 2399):   falseboldText: false)) I/flutter ( 2399): A GlobalKey can only be specified on one widget at a time in the widget tree. I/flutter ( 2399):  I/flutter ( 2399): When the exception was thrown, this was the stack: I/flutter ( 2399): #0      GlobalKey._debugReserveFor.<anonymous closure> (package:flutter/src/widgets/framework.dart:168:9) I/flutter ( 2399): #1      GlobalKey._debugReserveFor (package:flutter/src/widgets/framework.dart:178:6) I/flutter ( 2399): #2      Element.updateChild.<anonymous closure> (package:flutter/src/widgets/framework.dart:2735:13) I/flutter ( 2399): #3      Element.updateChild (package:flutter/src/widgets/framework.dart:2738:6) I/flutter ( 2399): #4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #5      Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #6      ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5) I/flutter ( 2399): #7      Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #8      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #9      Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #10     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5) I/flutter ( 2399): #11     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #12     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4601:32) I/flutter ( 2399): #13     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4992:17) I/flutter ( 2399): #14     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #15     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #16     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #17     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5) I/flutter ( 2399): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #19     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #20     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #21     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5) I/flutter ( 2399): #22     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #23     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #24     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #25     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5) I/flutter ( 2399): #26     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #27     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14) I/flutter ( 2399): #28     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #30     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #31     StatelessElement.update (package:flutter/src/widgets/framework.dart:3796:5) I/flutter ( 2399): #32     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #33     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4883:14) I/flutter ( 2399): #34     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #35     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #36     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #37     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5) I/flutter ( 2399): #38     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #39     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #40     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #41     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5) I/flutter ( 2399): #42     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #44     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #45     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5) I/flutter ( 2399): #46     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #47     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #48     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #49     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5) I/flutter ( 2399): #50     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #51     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #52     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #53     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5) I/flutter ( 2399): #54     Element.updateChild (package:flutter/src/widgets/framework.dart:2753:15) I/flutter ( 2399): #55     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16) I/flutter ( 2399): #56     Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5) I/flutter ( 2399): #57     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2278:33) I/flutter ( 2399): #58     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:700:20) I/flutter ( 2399): #59     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5) I/flutter ( 2399): #60     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1012:15) I/flutter ( 2399): #61     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:952:9) I/flutter ( 2399): #62     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:864:5) I/flutter ( 2399): #66     _invoke (dart:ui/hooks.dart:219:10) I/flutter ( 2399): #67     _drawFrame (dart:ui/hooks.dart:178:3) I/flutter ( 2399): (elided 3 frames from package dart:async) I/flutter ( 2399): ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter ( 2399): Another exception was thrown: Multiple widgets used the same GlobalKey. I/flutter ( 2399): Another exception was thrown: Multiple widgets used the same GlobalKey. I/flutter ( 2399): Another exception was thrown: The _ScaffoldLayout custom multichild layout delegate forgot to lay out the following child: I/flutter ( 2399): Another exception was thrown: Multiple widgets used the same GlobalKey. I/flutter ( 2399): Another exception was thrown: The _ScaffoldLayout custom multichild layout delegate forgot to lay out the following children:

@EdgyPostcards  I tried your code(remove some logics), but not throw any exceptions.
import 'package:flutter/material.dart';

class LoginPage extends StatelessWidget {
  final GlobalKey<FormState> formKey = GlobalKey<FormState>();

  @override
  Widget build(BuildContext context) {
    String email, password;
    return Scaffold(
      appBar: AppBar(
        title: Text("Sign in"),
      ),
      body: Form(
          key: formKey,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              TextFormField(
                validator: (input) {
                  if (input.isEmpty) {
                    return "Email required";
                  }
                },
                onSaved: (input) => email = input,
                decoration: InputDecoration(labelText: 'Email'),
              ),
              TextFormField(
                validator: (input) {
                  if (input.isEmpty) {
                    return "Password required";
                  }
                },
                onSaved: (input) => password = input,
                decoration: InputDecoration(labelText: 'Password'),
                obscureText: true,
              ),
              RaisedButton(
                onPressed: () async {
                  if (formKey.currentState.validate()) {
                    formKey.currentState.save();
                    bool success = true;
                    if (success) {
                      Navigator.pushNamed(context, '/');
                    }
                  }
                },
                child: Text('Sign in'),
              ),
            ],
          )),
    );
  }
}

My Flutter Version:
Flutter 1.5.4-hotfix.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7a4c33425d (5 weeks ago) • 2019-04-29 11:05:24 -0700
Engine • revision 52c7a1e849
Tools • Dart 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

@EdgyPostcards
At a first glance, this seems like a bug in provider package. It might because key is been used both in the child, and the builder when updating the value. Please contact the package owner about this issue.

I have solved this issue by generating the GlobalKey on the Statefull Widget that has the list itself and on initState setting the Key on my main App State class (I'm using ScopedModelDescendant for State management). By doing this, anytime a new view needs to be generated, instead of trying to re-use the old key, a new one gets generated on initState and saved on the global App State. This completely avoids the duplication of GlobalKeys.

Very Similar To Iterating through a list to render multiple widgets in Flutter?

I havent use any State Management package but it throws in my ListVIew.

I have added this    final scaffoldKey = new GlobalKey<ScaffoldState>(); to my ListView and I replaced that with Key("nefsfeed_scaffold_key") and that solved my problem.

I don't know if it helps, but I had this same error over a missing comma.
The code that failed on error:
--------------[code]-----------------
void main() => runApp(MaterialApp(home:
Text('Hello'),
));
The code that did not have the multiple widgets global key error:
-------------[code]--------------------
void main() => runApp(MaterialApp(home:
Text('Hello'),
),
);

I have GlobalKey<SwipeStackState> _key = GlobalKey<SwipeStackState>(debugLabel: 's');' in a state-full widget and passing this to another state-full widget. And using it in SwipeStack() which is from swipe_stack: ^1.0.0 package.

When i am using SwipeStack(key:_key) in the 1st widget it works fine without error.
2.When i am using SwipeStack(key:_key) in the 2st by passing it  gives error.

But in both the cases it works just The 1. works without any error 2. works with error.
What i am doing wrong !!!

If you are still seeing error, please open a new issue with a mini reproducible example. The current specific global key issue has already been resolved


ids-api: add jetty context alias

What this PR changes/adds
It adds an additional Jetty context alias for IDS API endpoints.
Why it does that
The custom context alias allows for defining e.g. request filters and exception mappers that target only the IDS API endpoints.
Further notes
Some MultipartSenders were updated, as they append the path of the IDS Multipart endpoint to the webhook address. They now use the path prefix of the respective API context for this. Furthermore, the IDS connector launcher and samples using Multipart were updated. The IDS API port has also been added to the helm charts.
In order to force a separate IDS API context, a PortMapping is added to the JettyService even if it is not part of the configuration properties. Therefore, the JettyService is currently injected into the IdsApiConfigurationExtension. In a subsequent PR, an interface will be extracted from the JettyService and used here instead.
Linked Issue(s)
Closes #815
Checklist

[ ] added appropriate tests?
[ ] performed checkstyle check locally?
[x] added/updated copyright headers?
[x] documented public classes/methods?
[x] added/updated relevant documentation?
[x] added relevant details to the changelog? (skip with label no-changelog)
[x] linked GitHub project? (see the section on the right-hand side -->)

Codecov Report

Merging #867 (ff4d233) into main (3428dbf) will increase coverage by 0.02%.
The diff coverage is 79.48%.

@@             Coverage Diff              @@
##               main     #867      +/-   ##
============================================
+ Coverage     60.07%   60.10%   +0.02%
- Complexity     2263     2266       +3
============================================
  Files           607      609       +2
  Lines         13071    13103      +32
  Branches        912      916       +4
============================================
+ Hits           7853     7875      +22
- Misses         4792     4798       +6
- Partials        426      430       +4

Impacted Files
Coverage Δ

.../api/multipart/controller/MultipartController.java
62.06% <ø> (ø)

...taspaceconnector/extension/jetty/JettyService.java
74.11% <0.00%> (-3.67%)
:arrow_down:

...patcher/sender/MultipartArtifactRequestSender.java
79.24% <66.66%> (-1.15%)
:arrow_down:

...tcher/sender/MultipartContractAgreementSender.java
81.08% <66.66%> (-1.78%)
:arrow_down:

...ispatcher/sender/MultipartContractOfferSender.java
88.33% <66.66%> (-1.33%)
:arrow_down:

...pi/configuration/IdsApiConfigurationExtension.java
93.33% <93.33%> (ø)

...tor/ids/api/configuration/IdsApiConfiguration.java
100.00% <100.00%> (ø)

...atcher/IdsMultipartDispatcherServiceExtension.java
75.00% <100.00%> (+0.64%)
:arrow_up:

...api/multipart/IdsMultipartApiServiceExtension.java
79.59% <100.00%> (ø)

.../control/HttpApiKeyAuthContainerRequestFilter.java
81.25% <0.00%> (-12.50%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3428dbf...ff4d233. Read the comment docs.


Remove data from IDs

Given we are not using randomly generated identifiers we need to take care not to leak private data. For example, a read group might be named by a patient name. Even if a client were to only store IDs, they may unintentionally be hosting private health data. When discussing the count everything grant this occurred to me since a common method of performing a count is measuring the number of unique identifiers.
ZGF0YXNldDE6YnJ1Y2V3YXluZWlzYmF0bWFu

This is valid point.  Despite appearing to `only' encode a file name, there are all kind of unintended ways
data can leak.   With dbGap protected data, where much of the metadata is public, the file names, which are created by the data submitter, are considered protected, as they have had cases where someone put protected data in the file name.

Good point. We should definitely bear this in mind.

The requirement of being able to randomly access a variant by ID places a lot of assumptions about how IDs are structured. To close, we will probably have to address at the schemas level.
Closing this can be done by using an identifier scheme that does not encode strings. It will still have to be a compound ID if we don't address it at the schemas level. However, this ID can be a concatenation of integers and doesn't need to encode strings, as the current ID scheme.


Should this be a standard syntax?

Since the vast majority of scripts are minified/have their white space removed anyway, this will not really have a lot of use in production (except maybe for the no-need-to-escape-backticks part). If this is only good for development, it could just be a Babel/TypeScript/similar feature.

Whitespace in strings is never removed by minifiers.

Right, but the point is that most code gets transformed to an older ECMAScript version (usually 5) and so all of those new syntax features are removed and replaced with old-style JavaScript, so it never gets to production at this state and production code is not readable anyway (intentionally).

I disagree - there are plenty of use-cases for uncompiled/unminified js, including in production. ES modules in browsers, lots of nodejs packages don't use typescript or babel, and I believe deno isn't designed to require a transpilation step.
Plus without a syntax proposal, I don't see it as likely that this would make its way into typescript.

Our two choices here are:

Syntax ```...```
Runtime template tag dedent`...`

Since the vast majority of scripts are minified/have their white space removed anyway, this will not really have a lot of use in production (except maybe for the no-need-to-escape-backticks part).

What I think is missed by this point is that the string can only be minified by default if it's a syntax. Most minifiers don't infer the runtime semantics of code, so the output will still contain the full dedent`...` and all of its newlines and whitespace. If there's a syntax form, then minifiers don't need to infer the runtime behavior, because it's set in stone by the spec.
So this actually points to a syntax being a needed feature.


Issue with post creation

Hello,
whenever I try to post a new Thread I'm getting this error right after message:
INFO:Set logged-in state successfully. All set!
DEBUG:Starting new HTTPS connection (1): i.instagram.com:443
DEBUG:https://i.instagram.com:443 "POST /api/v1/media/configure_text_only_post/ HTTP/1.1" 404 21807
[ERROR]  Failed to decode response as JSON
Traceback (most recent call last):
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
    return _default_decoder.decode(s)
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sites/26a/0/09b25bf6df/public_html/reqs.py", line 26, in post
    resp = response.json()
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sites/26a/0/09b25bf6df/public_html/test.py", line 27, in <module>
    loop.run_until_complete(main())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/sites/26a/0/09b25bf6df/public_html/test.py", line 23, in main
    await post()
  File "/home/sites/26a/0/09b25bf6df/public_html/test.py", line 13, in post
    result = await api.post("Hello world!")
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/threads_api/src/threads_api.py", line 107, in wrapper
    return await func(self, *args, **kwargs)
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/threads_api/src/threads_api.py", line 1079, in post
    res = await self._private_post(url=post_url, headers=headers,data=payload)
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/threads_api/src/threads_api.py", line 107, in wrapper
    return await func(self, *args, **kwargs)
  File "/home/sites/26a/0/09b25bf6df/.local/lib/python3.10/site-packages/threads_api/src/threads_api.py", line 157, in _private_post
    return await self._auth_session.post(**kwargs)
  File "/home/sites/26a/0/09b25bf6df/public_html/reqs.py", line 32, in post
    raise Exception('Failed to decode response as JSON')
Exception: Failed to decode response as JSON

Does anyone know what should this one mean? Thanks

Hi, thanks for choosing threads-api :)
It means that the HTTP response you received from Threads.net is not as expected. One reason could be that the underlying authentication timed out or is no longer valid.
Please set LOG_LEVEL environment variable to DEBUG so you are able to see the full response. It usually hints as to why it had failed. You can run your script like this: LOG_LEVEL=DEBUG python3 main.py to include it.
If you need further assistance, please add additional details from the logs.

Please re-open with additional info if still reproduces after version v1.1.13 (https://github.com/Danie1/threads-api/releases/tag/v1.1.13). It contains improvements in this area / the solution, so at the very least it will be easier to troubleshoot if a different issue appears.


Providing a base path from "outside" does no longer work (migration from 1.1.x to 2.1.x)

In our web tests we host a Kestrel server for our web assembly, in 1.x we did it in the following way:
var webHost = new WebHostBuilder()
  .UseContentRoot(webClientProjectDirectory)
  .UseEnvironment("WebTesting")
  .UseSetting(WebHostDefaults.ApplicationKey, applicationAssemblyName)
  .UseStartup<TStartup>()
  .UseUrls(url)
  .UseKestrel()
  .Build();

Moving to 2.x we used the new program pattern instead:
var host = WebHost.CreateDefaultBuilder()
  .UseContentRoot(webClientProjectDirectory)
  .UseEnvironment("WebTesting")
  .UseStartup<TStartup>()
  .UseUrls(url)
  .Build();

However, now we run into the following problem:

System.InvalidOperationException : A path base can only be configured using IApplicationBuilder.UsePathBase().

What's the correct way to do this?

It looks like the problem is with UseUrls() if the URL contains a base path. If we remove the base path it works. However, we want to apply such a base path FROM OUTSIDE? (please don't tell me to call UseBasePath inside Startup.Configure ;))

Not providing the base path via UseUrls() and instead using UseBasePath() also seems to prevent the UseStatusCodePagesWithReExecute to use the correct root path, i.e., a path of "/Error" in UseStatusCodePagesWithReExecute does not use the configured base path.

@JunTaoLuo is this the same issue as https://github.com/aspnet/Home/issues/3495?

Though this is the same error, I think the scenario is different.
@drauch what do you mean by "from outside"? Is the requirement here to set the base path based on an environment variable? If so, I think it would be easiest to set two separate environment variables, one for the url and one for the path base and call UseUrls and UseBasePath on the two environment variables. While we have an explicit configuration key for urls: https://github.com/aspnet/Hosting/blob/master/src/Microsoft.AspNetCore.Hosting.Abstractions/WebHostDefaults.cs#L17, we don't have one for base path: https://github.com/aspnet/Hosting/issues/1120. You'll need to set and read your own environment variable with a custom name.

Unfortunately we don't have a first class way of doing this on the WebHostBuilder. The issue I linked https://github.com/aspnet/Hosting/issues/1120 is the enhancement that would address this. Closing as dupe cc @Tratcher @davidfowl.
@drauch The closest thing I can think of to what you want to do is to create a StartupFilter that adds the call to UsePathBase:
    public class PathBaseStartupFilter : IStartupFilter
    {
        public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next)
        {
            return builder =>
            {
                builder.UsePathBase(Environment.GetEnvironmentVariable("CUSTOM_PATH_BASE"));
                next(builder);
            };
        }
    }

    public class Program
    {
        public static void Main(string[] args)
        {
            CreateWebHostBuilder(args).Build().Run();
        }

        public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
                .ConfigureServices(services =>
                {
                    services.AddTransient<IStartupFilter, PathBaseStartupFilter>();
                })
                .UseStartup<Startup>();
    }

@JunTaoLuo : Thank you for the workaround! Hope that https://github.com/aspnet/Hosting/issues/1120 will be implemented!


WebRTC doesn't support H264 streams with B-frames

Which version are you using?
v0.21.2
Which operating system are you using?

[ ] Linux amd64 standard
[ ] Linux amd64 Docker
[ ] Linux arm64 standard
[ ] Linux arm64 Docker
[ ] Linux arm7 standard
[ ] Linux arm7 Docker
[ ] Linux arm6 standard
[ ] Linux arm6 Docker
[x] Windows amd64 standard
[ ] Windows amd64 Docker (WSL backend)
[ ] macOS amd64 standard
[ ] macOS amd64 Docker
[ ] Other (please describe)

Describe the issue
After successful streaming, WebRTC cannot be previewed normally using the browser
Describe how to replicate the issue

start the server
publish with OBS
open with Microsoft Edge http://<IP_ADDRESS>:8889/live/1

Did you attach the server logs?

2023/02/19 16:47:25 INF [WebRTC] [conn <IP_ADDRESS>:53276] opened
2023/02/19 16:47:26 INF [WebRTC] [conn <IP_ADDRESS>:53276] peer connection established, local candidate: host/udp/<IP_ADDRESS>/51956, remote candidate: prflx/udp/<IP_ADDRESS>/51952
2023/02/19 16:47:26 INF [WebRTC] [conn <IP_ADDRESS>:53276] is reading from path 'live/123456', 1 track (H264)
2023/02/19 16:47:26 INF [WebRTC] [conn <IP_ADDRESS>:53276] closed (WebRTC doesn't support H264 streams with B-frames)
Did you attach a network dump?

no
Problems I need to solve
how to let the rtsp server support H264 streams with B-frames, or how to let html use other frames to play video
Solve one of them to meet my needs

It's a browser limitation, not a server one.
Disable B-frames or fill a bug into the Firefox, Chromium and Edge bug tracking system, but they will all reply that the WebRTC specification doesn't contemplate B-frames.


Remove now obsolete references to transmission_fraction and flux

Since the integration of PRs to fix #1733 ~and #1033~ we can now remove the code referenced by the corresponding TODOs and also remove the ispyb_params fields
#1033 current energy covered by #1292

Sorry, my bad for making awkward half issues. This makes sense to do as one with https://github.com/DiamondLightSource/hyperion/issues/1292 so putting it all in there.


MDN Links on html tags not working in .vue files

VSCode Version: 1.38
OS Version: Windows 10

Steps to Reproduce:

Open a .vue file
Make a html tag, like <span>
Hover the tag

The MDN links work if I'm in a HTML file, as follows:

But when inside a .vue file, I get only the description, but not the links and tag name

Please open an issue for https://github.com/vuejs/vetur. Thanks!


docs: fix broken link

Description
Fixes a broken link in the runtime readme.
Issue
No related issue.
Type of change
Please mark the relevant option(s):

[ ] New feature, functionality or library
[ ] Bug fix
[ ] Code health or cleanup
[ ] Major breaking change
[x] Documentation
[ ] Other

List of changes

Add the HTTP protocol prefix to the 12 factor app link URL

Testing

[ ] make develop_test
[ ] LocalNet w/ all of the steps outlined in the README

Required Checklist

[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have tested my changes using the available tooling
[ ] I have updated the corresponding CHANGELOG

If Applicable Checklist

[ ] I have updated the corresponding README(s); local and/or global
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added, or updated, mermaid.js diagrams in the corresponding README(s)
[ ] I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

Waiting for #450 to be merged as runtime module changelog would conflict.


Feature flag support for preliminary release

The following features are NOT flagged because we want to release with them

Validation Capability
Validation UI
Backend capability for subsets
Flat-manager capability for subsets

The following features need to be flagged so that we can disable them if necessary in the first release of the website

[ ] Payments in general (ie wallet, stripe onboarding etc) in UI
[ ] Wallet API on the backend
[ ] Vending API on the backend
[ ] Application ownership tokens UI
[ ] Application ownership tokens API

Out of scope for initial release:

flatpak-authenticator

I've tagged some issues with this milestone https://github.com/flathub/website/milestone/4

Frontend implementation hiding the controls in https://github.com/flathub/website/pull/903
Pretty much untested, as we have no prod env setup yet.


bug: cairo-lang-casm cannot be used as an external crate

Bug Report
Cairo version:
v.0.1.0
Current behavior:
cairo-lang-casm and other crates depending on cairo-vm cannot be used as external crates in other projects.
Expected behavior:
cairo-lang-casm and other crates depending on cairo-vm can be used as external crates.
Steps to reproduce:
cairo-vm 0.1.1 is a breaking change, the issue and the steps to reproduce have been described in https://github.com/lambdaclass/cairo-rs/issues/730
For example:
cargo new --lib example
cd example/
cargo add cairo-lang-starknet
cargo check

Cargo check fails.
Related code:
Other information:
I imagine this has to be fixed either on cairo's side by further restricting the dependency to =0.1.0 or on cairo-vm's side by yanking the release and re-releasing as 0.2.0.

Will be fixed in the next release.

I think this is solved


Update for retry and expiry time of websocket console. - [closed]

In GitLab by @wknet123 on Oct 23, 2017, 10:41
Merges dev-refine-console-websocket -> dev

In GitLab by @wknet123 on Nov 13, 2019, 10:06
closed


Set-DBAPowerPlan fails on None English language machines

Bug Report
Test-DbaPowerPlan correctly handles different languages but Set-DbaPowerPlan fails as it has hardcoded parameter set for English and also this line fails on none-english language machines
https://github.com/sqlcollaborative/dbatools/blob/master/functions/Set-DbaPowerPlan.ps1#L104
General Troubleshooting steps

[ X] Verified running latest release of dbatools?
[ X] Verified errors are not related to permissions?
[ X] Can duplicate in new/fresh PowerShell.exe session?

Version Information

Operating System Replicated on various OS's and hardware

Steps to Reproduce

@jaapbrasser agreed that he would fix this one for us :-)

Was this ever fixed?

Yes, actually! https://github.com/sqlcollaborative/dbatools/blob/master/functions/Set-DbaPowerPlan.ps1#L169

Users will still have to use the english equivalent of the parameters tho.

Wait, no I'm wrong. This can be fixed by using tEPP and i'm eager to avoid school work brb

Please fix the spelling in "reqested" in the function while you are at it ;)

Done ;)


Move BaseMessageEventUtil to trace package.

BaseMessageEventUtil cannot be under internal package, because in some build systems this introduces circular dependency (internal depends on trace while trace depends on internal).

Codecov Report

Merging #1076 into master will decrease coverage by 0.05%.
The diff coverage is 45.45%.

@@             Coverage Diff              @@
##             master    #1076      +/-   ##
============================================
- Coverage     81.77%   81.71%   -0.06%
  Complexity     1175     1175
============================================
  Files           184      184
  Lines          5508     5512       +4
  Branches        510      512       +2
============================================
  Hits           4504     4504
- Misses          869      871       +2
- Partials        135      137       +2

Impacted Files
Coverage Δ
Complexity Δ

api/src/main/java/io/opencensus/trace/Span.java
83.87% <ø> (ø)
12 <0> (ø)
:arrow_down:

...main/java/io/opencensus/trace/export/SpanData.java
95.12% <ø> (ø)
6 <0> (ø)
:arrow_down:

...pencensus/trace/internal/BaseMessageEventUtil.java
66.66% <45.45%> (ø)
4 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37fe5d3...09db4ec. Read the comment docs.


[Request] Rockets travel between planets

There should be a config option to allow a rocket with a high amount of fuel (maybe require advanced engines?) to be able to travel between different planets in the same star system, and only require the warp core for travel between different star systems. This would enhance the options a pack creator has for balancing purposes.

What do you mean? You can still gate warp without the core, by gating planet selection options like the holo planet selector and the warp core.


Add support for matching delimiter blinking

I would like rustyline to blink the matching delimiter once I type it.  Is there any reason you see why this shouldn't work in the library? Otherwise, I can put together a pull request.
I would think to start with () but I don't see an immediate reason to not add {} [].  Perhaps it should be configurable for the user?

Should be possible with Highlighter trait introduced in 2.0.
I will give it a try.

3.0.0 released.


Scale option always set to 1

Hi,
It seems that the scale option is always set to 1 for me in the command line, no matter what value is entered in the GUI.

My bad, the scale parameter has changed (--sc instead of --s).
I'll release a hotfix as soon as I can. Watch for version 1.3b


Fluid Player full screen button not working on Firefox for Windows

Fluid Player 2.4.8's full screen button does not work on most (but not all!) videos hosted on the following linked website. If I click on the full screen button, it will change state itself, but the video will not go full screen. This occurs with Firefox (mine is version 69.0.3, but it is the same with an older version, maybe 57, on a virtual machine of mine with a just installed Windows). In any case, the problem will not occur with Chrome and Opera browsers.
Here are two links to two random videos with this problem:
(warning: ADULT content)
https://mogliescopata.com/fidanzata-con-le-tette-abbondanti-si-scopa-il-ragazzo-in-un-video-natalizio-diventato-porno
https://mogliescopata.com/milfona-bionda-viene-scopata-duramente-su-una-panchina-nel-parco
Instead, here are two WORKING ("full screenable") random videos from the same website:
(warning: ADULT content)
https://mogliescopata.com/bellissima-con-occhi-di-ghiaccio-succhia-il-cazzo-in-pov
https://mogliescopata.com/svenuta-come-una-bambola-ma-con-la-figa-bagnata
Thanks

Ok, I have figured it out.
When an i-framed HTML5 video cannot go fullscreen, it's because the "allowfulscreen" HTML attribute related to the iframe where the video itself is embedded is missing or omitted. Firefox, for security reasons, avoids the fullscreen mode if it can't find that HTML attribute. It's a webmaster's fault! As a workaround, I went to the "about:config" Firefox page, searched for "dom.event.contextmenu.enabled" and turned its value into "false". Finally, right-clicking on the HTML5 videos that couldn't go fullscreen, I can choose "fullscreen" from a context menu, which wasn't previously enabled, so bypassing the regular "fullscreen" button of Fluid Player, which doesn't work for that particular video (just because the "" HTML attribute is missing).


Not safe to restore individual nodes from a backup

Maxime Caron @maximecaron 13:55
Quick question.
if we have a cluster of cockroach machine and one machine hard drive is dead.
Is it safe to simply replace the harddrive and restore a backup and have the machine rejoin with the same identity port and IP. Or will that break the Raft quorum?
RaduBerinde @RaduBerinde 14:36
Hm, that is a good question.. @ben, @tschottdorf what do you think?
Tamir Duberstein @tamird 14:40
i think that’s safe
Bram Gruneir @BramGruneir 14:49
@maximecaron If you haven’t broken quorum, so only a single hard drive or machine has died, you wouldn’t even need to restore the backup. Just replace the hard drive.
And feel free to start it back up with the port and IP.
The repair mechanism will kick in (after ~5 mins) and should have already added more replicas on other nodes.
Ben Darnell @bdarnell 14:57
@maximecaron It’s not safe to restore individual cockroach nodes from a backup; bad things happen if the raft state moves “back in time"
if a hard drive dies you have to bring that node back up as a brand new node
in a multi-drive system, you can keep the working drives and replace the failed drive with a new blank one
for this reason, in the long run, it is likely to be better to run cockroachdb with access to individual disks instead of using something like RAID
Bram Gruneir @BramGruneir 14:59
Ben, I can see a lot of people thinking that restoring a backup would be needed or helpful. We should ensure we handle these cases correctly.
Ben Darnell @bdarnell 15:00
it’s really hard to detect this. the node itself can’t tell, and I’m not sure how we’d verify it in a distributed fashion
Andrei Matei @andreimatei 15:00
how could we not handle them correctly? how’s a node with a restored store different from a slow node?
Ben Darnell @bdarnell 15:00
maybe a pre-join raft rpc to be sent on each range to ensure that the node’s own state agrees with what its peers think?
a restored node moves back in time. consider this sequence of events: 1) backup 2) raft election 3) cast vote for node A 4) failure, restore from backup 5) see election again, cast vote for node B
the node changes its vote and this can result in split-brain
Andrei Matei @andreimatei 15:02
i see
Ben Darnell @bdarnell 15:02
one raft election won’t last long enough for a backup to be restored, but there are other (probably less severe) things that can happen if a node loses log entries that it had acknowledged in between the backup and the failure
etcd’s admin guide warns against restoring from backups, although perhaps less explicitly than necessary to get the point across: https://coreos.com/etcd/docs/latest/admin_guide.html
Spencer Kimball @spencerkimball 15:04
@jseldess we should include this in our documentation

This hasn't come up again, so closing.


Dev modules

Rewrote into modules so we can easier add/remove functionality in the future (includes some example skybox work)
other:

Removed mapbox default style from demo since it involves an api-key
Added default grey surface plane to demo

Closed because too much diverging with master branch


Use a separate config file to specify root (or other plugin options)

Mentions:
https://github.com/Ekopalypse/NppLspClient/issues/15#issuecomment-2280065271
https://github.com/Ekopalypse/NppLspClient/issues/15#issuecomment-2282652913
@Ekopalypse At first I have a few basic questions:

Plugin uses only one server instance for each language? Regardless of the directories we operate on, only one server will be running and it will try to work on such folders (treating them as one project or separate projects depending on what commands you use)?
Initialization of such a server is done only once? Or maybe when we switch to a separate folder, the initialization occurs again? I'm trying to understand if we have different server configuration files in different folders, will they be processed somehow, or maybe just this one when we start a given server (or they will always be overwritten when we switching folders and that's why the server works for separate folders).
What exactly happens when we have 2 separate folders (or more), we start the server when the first one is active and then go to the second one? Something like that:

outside.js
dirA
    jsconfig.json
    fileA1.js
    fileA2.js

dirB
    jsconfig.json
    fileB1.js
    fileB2.js

Let's say the file fileA1.js is active, we run server, and now we go to fileB1.js. Initialization will occur 2x? Will it somehow remember the settings for both folders separately or will one overwrite the settings of the other?
I'm testing it for JS and it looks like it's able to process configurations for each folder separately (when I go to different folders they respect their configuration file). The exception is when both folders use the same file (e.g. from outside), then when I'm in such a file the hints in it only work for one folder (the one that first processed jsconfig.json).

The client does NOT know how a server handles such information. Whether it treats the different root folders as different projects or as a single project depends on the server. As far as I know, there is currently no specification in the protocol that would allow a client and a server to define how to use such workspace folders.

This means that we have to check it individually in each server, which is a bit tedious. But LSP coverage in each server is at a different level, so it's less surprising. We just need to test a lot.

If you want to work on several projects per server in parallel, you should use different Npp instances.

I eventually thought about that too, but I would rather avoid it. Fortunately, this LSP for JS works in such an interesting way that it treats such folders as different projects (I just have to use configuration files pointing to the files of a given project in each such folders).

I just have to use configuration files pointing to the files of a given project in each such folders

But wouldn't that mean that you have to remember to maintain this file as well?
The more I think about it, the more I don't like it.
Don't get me wrong, I can implement it, but it doesn't seem to benefit my workflow.
Think about how you work on a project - how do you do it?
I, personally, open a cmd with all the environment variables I need and start Npp from the root of such a project - done. Instead of FAW, we could also determine the current directory and then use it. But that would mean that we are now restricted to an language server.
Now suppose you were asked to check/correct a file of another project that uses the same server.
If you want to use the same npp instance, there is no guarantee that the currently running server can provide the features you assume are available due to a different language-specific project configuration file. Even if it works today, the operators of such servers might think differently in the future.
The only options I see would be to either stop the current server and restart it with the other project root or implement a client function to start another instance of that server.
However, this in turn means that workspace folders can no longer be determined. For example, if there is a file X that cannot be determined from the root directory of either project A or project B, which server should it be assigned to?
I don't like the current situation 100% either, but I don't yet see how this could really be improved.


Add refreshing

My intention is to match the FlatList API. I hope my attempt is consistent with the goals of this library.

Thanks a lot! The intention is definitely to bring the API as close as possible to FlatList. I just didn't port over every prop since I didn't have a use case for them yet.


ossaudiodev.c:33:27: fatal error: sys/soundcard.h: No such file or directory

The file can be found in the NDK source tree in the include directory linux/soundcard.h. I guess the python sourcecode needs a patch to search for this file in the correct location.

It seems it builds fine with sys/soundcard.h linked to linux/soundcard.h, so I fixed that. Thanks for the suggestion!


Add the ability to use kiosk mode form a mobile phone, use camera to capture barcode on IDs

 Add the ability to use kiosk mode form a mobile phone, use camera to capture barcode on IDs #812

Barcode scanner successfully implemented using HTLM5qrcode library; quagga library previously used but was not accurately working.
There is a footer issue that needs to be fixed when the scanner is displayed
Also had some thoughts about adding a beep sound to the barcode


Update Tags and Add Keywords Separately – October 2024

Description

Related Issue(s)

Checklist

[ ] I have read the contribution guidelines
[ ] I have considered the performance impact of these changes
[ ] Suitable unit/system level tests have been added and they pass
[ ] Documentation has been updated

@sumitshinde-84 Can you take a look at this PR?


Homepage-Calendar

Thair--create calendar and style homepage
-able to display calendar
-able to mark calendar when date is done

not working this anymore


Module not found: Error: Can't resolve '@nestjs/microservices'

Hi!
I'm trying to build a microservice with nest.js in nx monorepo and it turns out that when I'm building it it tries to pull all the dependencies, not the ones that are needed.
I create a pretty simple setup:
npx create-nx-workspace@latest t3a

then I add your library:
npm i -D @ns3/nx-serverless

And then when I try to run a serverless function created with nest (this way: https://docs.nestjs.com/faq/serverless)
It fails with many dependency errors:
ERROR in<EMAIL_ADDRESS>22:239-267
Module not found: Error: Can't resolve 'class-transformer' in '/Users/kostya/www/t3a/node_modules/@nestjs/common/serializer'
<EMAIL_ADDRESS>4:21-62
<EMAIL_ADDRESS>22:21-44
 @ ../../../apps/api/src/app/app.module.ts 2:0-40 8:4-10
 @ ../../../apps/api/src/main.ts 3:0-45 6:41-50

ERROR in<EMAIL_ADDRESS>18:102-145
Module not found: Error: Can't resolve '@nestjs/websockets/socket-module' in '/Users/kostya/www/t3a/node_modules/@nestjs/core'
<EMAIL_ADDRESS>25:21-50
 @ ../../../apps/api/src/main.ts 1:0-43 6:22-40

ERROR in<EMAIL_ADDRESS>19:119-172
Module not found: Error: Can't resolve '@nestjs/microservices/microservices-module' in '/Users/kostya/www/t3a/node_modules/@nestjs/core'
<EMAIL_ADDRESS>25:21-50
 @ ../../../apps/api/src/main.ts 1:0-43 6:22-40

ERROR in<EMAIL_ADDRESS>117:115-147
Module not found: Error: Can't resolve '@nestjs/microservices' in '/Users/kostya/www/t3a/node_modules/@nestjs/core'
<EMAIL_ADDRESS>25:21-50
 @ ../../../apps/api/src/main.ts 1:0-43 6:22-40

ERROR in<EMAIL_ADDRESS>52:115-147
Module not found: Error: Can't resolve '@nestjs/microservices' in '/Users/kostya/www/t3a/node_modules/@nestjs/core'
<EMAIL_ADDRESS>27:21-46
 @ ../../../apps/api/src/main.ts 1:0-43 6:22-40

And many others...
This is an entry nestjs application with only one module, controller and service. It doesn't need all these dependencies.
If I manually add @nestjs/microservices and the rest of the dependencies to the root package.json there will be more errors like missing redis, amqp etc... which I definitely don't use.
Is this something I should fix on my side, or is the problem is at your side?
I'll appreciate any help.
Thank you.

Here's my package.json:
{
  "name": "t3a",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "start": "nx serve",
    "build": "nx build",
    "test": "nx test"
  },
  "private": true,
  "dependencies": {
    "@nestjs/common": "^8.0.0",
    "@nestjs/core": "^8.0.0",
    "@nestjs/platform-express": "^8.0.0",
    "@vendia/serverless-express": "^4.5.3",
    "aws-lambda": "^1.0.7",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^7.0.0",
    "tslib": "^2.0.0"
  },
  "devDependencies": {
    "@nestjs/schematics": "^8.0.0",
    "@nestjs/testing": "^8.0.0",
    "@nrwl/cli": "13.7.3",
    "@nrwl/eslint-plugin-nx": "13.7.3",
    "@nrwl/jest": "13.7.3",
    "@nrwl/linter": "13.7.3",
    "@nrwl/nest": "13.7.3",
    "@nrwl/node": "13.7.3",
    "@nrwl/tao": "13.7.3",
    "@nrwl/workspace": "13.7.3",
    "@ns3/nx-serverless": "^2.0.0",
    "@types/aws-lambda": "^8.10.92",
    "@types/jest": "27.0.2",
    "@types/node": "16.11.7",
    "@typescript-eslint/eslint-plugin": "~5.10.0",
    "@typescript-eslint/parser": "~5.10.0",
    "eslint": "~8.7.0",
    "eslint-config-prettier": "8.1.0",
    "jest": "27.2.3",
    "prettier": "^2.5.1",
    "serverless": "^2.68.0",
    "serverless-bundle": "^5.2.0",
    "serverless-offline": "^8.3.1",
    "ts-jest": "27.0.5",
    "typescript": "~4.5.2"
  }
}

The same happens if I'm using version @12 of NX and version 1.4 of nx-serverless.

Hi, I would need to see the repository, but the way it works you should use app generated with nx-serverless generator. Then you can setup NestJs project to run within that project. Or you can start with NestJs started and adjust it to nx-serverless. Simply adding @ns3/nx-serverless to deps won't make it work.

Since there is no activity I am closing issue. Please feel free to reopen.

@qstyler I ran into this too. I used the options for serverless-bundle.
in serverless.yml
custom:
  bundle:
    linting: false
    tsConfig: 'tsconfig.app.json'
    ignorePackages:
      - cache-manager
      - class-validator
      - class-transformer
      - '@nestjs/websockets/socket-module'
      - '@nestjs/microservices/microservices-module'
      - '@nestjs/microservices'


monadic-scalatags

Consider this to be in-progress, a draft.
The absence of types in the xml tags (in combination with my own stupidity) has lead to some bugs in my monadic-html based project in the past. Because of that I've been looking for a way to make my templates a bit more type-safe and during my experimentation I stumbled over scalatags and found that they make a surprisingly good match for monadic-html.
So I've been experimenting with this a while ago and I was wondering if we could bring this into monadic-html somehow.
As mentioned; this is a draft, a sketch, so I'm thankful for any feedback.

Thanks for opening the PR and starting the discussion!
I personally don't like scalatags but I'm not opposed to the idea of having an integration. Could you perhaps translate the examples from the README to see what they would look like? For example, I would like to see how this one translates to what you are proposing.
I only had a brief look at the diff, but my main concern from the get go is that the APIs would look quite different between the xml and the scalatags version...

Hey, thanks for giving this a think!
That's what the example would look like.

  val a: Rx[String] = Var("id1")
  val b = Var("foo")
  val c = Var("bar")

  div(
    id := a,
    "Variable 1: ", b, "; variable 2: ", c, "."
  )

The API would indeed look quite a bit different. Embedding mhtml tags into scalatag templates looks reasonably simple, but I don't see an easy way of doing it the other way around - that would require changes in the way that mount currently works.
I recognize that with scalatags templating will lose one very nice feature - "friendly syntax for frontend developers". I still hope there's room for scalatags templating in mhtml

I was mostly asking about the difference between the mount(…) and the (…).render syntax, I don’t understand why the scalatags implementation would need to differ here.
Also, looking at the diff again, it seems that you didn’t need to change any of the code that’s already there. Could we possibly envision monadic-scalatags to be a separate library / live in a separate repository?


v3 Routes with Blockbook and Bitcore API Endpoints

This PR adds new v3 endpoints. It also adds new blockbook and bitcore route libraries to replace the need for the outdated Insight API for requesting address balances and UTXOs.
Libraries
The new route libraries:

Bitcore Node API
Blockbook API

Both APIs have GET and POST (bulk) endpoints for querying address balances and UTXOS associated with an address.
Tests

Unit tests can executed with the command npm run test-v3
Integration tests can be run by adding these lines to the test-local-server script, to instruct rest to use the prototype API servers I set up:

# Testnet Bitcore Node API
#export BITCORE_URL=http://decatur.hopto.org/
export BITCORE_URL=http://<IP_ADDRESS>:3003/

# Testnet Blockbook
export BLOCKBOOK_URL=https://<IP_ADDRESS>:9130/
# Allow node.js to make network calls to https using self-signed certificate.
export NODE_TLS_REJECT_UNAUTHORIZED=0

export TEST=integration

npm run test-v3

The data coming back from both servers can be viewed in these mock files:

Bitcore mock file
Blockbook mock file

Pull Request Test Coverage Report for Build 2429

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage remained the same at 70.93%

Files with Coverage Reduction
New Missed Lines
%

dist/util/winston-logging.js
1
87.5%

Totals

Change from base Build 2427:
0.0%

Covered Lines:
2193

Relevant Lines:
2890

💛  - Coveralls

I'm closing this PR as it has become stale. Rather than supporting the indexers in this PR, the new version of rest will be 'indexer agnostic'. It will be able to interface with Blockbook or the Bitcoin.com Ninsight indexer and provide the same output data regardless of which downstream resource it points to.


Delegations in owner's view

User Story
How the role owner sees active delegations

Epic Title
Delegation

T-shirt size:

User Story
"As an APPROVER in NExts with active delegations, I want to see and still act on pending delegations for my roles."

Description
This functionality allows a role owner who has delegated approvals to someone else to see and act upon Pending proposals.

Delegates in an active delegation shall show up under the Delegations tab on Approver UI.  Pending Proposal count next to name (A5-1 in XD)
role owner can still view and act on these pending proposals
Selecting a delegate from 'Delegations' list opens a page of the pending proposals assigned to them.  This page has the ability to show proposals Sorted by requester, then role -- OR -- sorted by role then by person.  This page also has the functionality to sort across these categories by date requested.
Selecting a proposal (or set of proposals) will allow Role Owner to Approve or Reject
Once a proposal is acted upon, the proposal will no longer show in the 'Delegated' tab and will appear under the appropriate other tab (Approved or Rejected) with an indication of who did the action.

Acceptance Criteria/Tests

delegate avatars, names and pending proposal count shows under Delegations tab only when the delegation is Active (ie current date is between start and stop)
delegate avatar, names and counts shall appear even the pending count is 0
once acted upon by the role owner, the proposal will NOT show up in the history for the delegate (since they took no action)

migrated to new tmobile/sawtooth-next-directory repo


list_evaluation_modules returns empty list

For some reason when i run this:
print(evaluate.list_evaluation_modules(include_community=False))

I get an empty list.
evaluate==0.4.2

I also face this problem

are you able to import the evaluate library on google colab on TPU? For some reason my runtime crashes everytime i try to import it, I tried it on a clean notebook and with other libraries and its the same issue. I'm wondering if there's many bugs with the evaluate library itself

same in evaluate==0.4.3


Suggestions disappear as soon as a 'space' is encountered

Thank you for this awesome suggester. Is there any way to search records with spaces? For example, on my setup, we've firstname' lastname` , with a space in between. Right now, I do get perfect suggestions when someone enters -
@ron -> suggests: Ronaldo Wayne, Ronan King etc.
but as soon as I enter -
@ronaldo w -> the suggestions disappear.
Would really appreciate if someone can help fix this issue. Thank you for your time!

@thebigk then the suggestion list will be opened on every time you hit space. This can't be done.

Thank you for your response. But I've seen this working. This needs to work only when the suggestions are already being shown, not all the time.

It is certainly doable but hard to implement. Whole strategy relies on finding the last space.

Binance Airdrop Guide: Claim Your $1500 in BNB Now!
🎉 Congratulations! You've won a share of the $1.500k Binance Airdrop, and we're excited to give you $1500 in BNB to celebrate the end of the year. But that's not all—connect now, and you'll instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1.500k in BNB! Plus, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, seize the chance to win up to $20,000—it's your golden opportunity!
Winners: @4j4yk, @Keyao7, @ethanliew, @mgalli97, @Pineana, @louchenyao, @hidaruma, @micln, @sponnusa, @L040610, @Logan-OmegaGO, @pdrosos, @yavuzyurtbegendi, @libchaos, @wadiuvatzy, @370873678, @dhzjfhtm, @alexyy, @c1982, @congim, @dpwupan, @imyuliz, @Yang-zhizhang, @bbortt, @HanzhengLyu, @opensussex, @semyon-dev, @cunglee, @mortycodes, @nuomiji, @byteshiva, @pranitbauva1997, @xuxiaoyuspallow, @LKK2LQQ, @stevenferrer, @fengjw1, @aquaflamingo, @aliiohs, @ofshellohicy, @kalbhor, @lexkong, @miraclew, @noelyahan, @JingwenTian, @EthanLiu1991, @aliyevorkhan, @azril0409, @shadow3x3x3, @ericmm, @kevin-hxq


Document event hooks

documented the following event hooks: infinityModelUpdated and infinityModelLoaded

Hi @hhff I'm not sure why this is failing on Travis but the tests are passing locally!

ahhh @ashrafhasson - the reason it's failing is because Ember 2.0 is now the "beta" that Ember Try tests against.  I guess I'll have to do some work to make this addon work against ember 2.0 beta.
grrrr
OK if we leave this hanging for a minute?  Either way, we'll need to rebase against master, as we need to squash these commits.
Thankyou so much!!

@hhff yeah no worries. I'm going to branch the computed property into its own as well and submit a PR for it, later on you can cherry-pick if you wish :)

@ashrafhasson YOU'RE THE MAN

@ashrafhasson if you rebase this against master & squash these commits down, your tests will pass.  Keen to merge this in!!!


Storage documentation

Some additions to the storage documentation:

Link to storage volume video
Information about special storage volumes
Links between storage explanation and how tos

Documentation preview available at: https://linuxcontainers.org/lxd/docs/pr.10932/

Testsuite passed


Unified Cyber Ontology Change Proposal

Background
The investigation of crimes against children, especially those involving online activities, presents unique challenges that require specialized concepts and properties within the Unified Cyber Ontology (UCO). This proposal aims to enhance UCO by introducing a new concept related to the categorization and investigation of crimes against children. The primary objective is to provide investigators and analysts with a more robust and precise ontology to support their work in identifying, categorizing, and analyzing evidence related to such crimes.
Requirements
Requirement 1
Introduce a new class, ChildExploitationCrime, under the existing CyberCrime class to categorize crimes specifically related to the exploitation of children.
Requirement 2
Define properties for ChildExploitationCrime to capture specific details, including but not limited to:
victimAgeRange
crimeType (e.g., grooming, trafficking, child pornography)
onlinePlatformUsed
offenderProfile
Risk / Benefit analysis
Benefits
Improved Investigation Framework: Providing a dedicated class and properties for crimes against children helps investigators and analysts structure and analyze data more effectively.
Enhanced Data Interoperability: Standardizing the representation of child exploitation crimes ensures better data sharing and interoperability between different law enforcement agencies and tools.
Focused Analytical Capabilities: By capturing specific details of these crimes, analytical tools can provide more focused insights, potentially leading to faster identification and intervention.
Risks
The submitter is unaware of risks associated with this change.
Competencies demonstrated
Competency 1
Providing a detailed ontology for crimes against children enhances the ability to answer specific investigative questions and supports more focused data analysis.
Competency Question 1.1
Can we identify all cases of child exploitation involving online grooming over a specific period?
Result 1.1
A SPARQL query can retrieve cases where crimeType is "grooming" and filter by date.
Competency Question 1.2
Which online platforms are most frequently used for child exploitation crimes?
Result 1.2
A SPARQL query can aggregate and list onlinePlatformUsed for all instances of ChildExploitationCrime.
Solution suggestion
Define the new class ChildExploitationCrime under CyberCrime.
Add properties:
victimAgeRange (datatype: string)
crimeType (datatype: string)
onlinePlatformUsed (datatype: string)
offenderProfile (datatype: string)
Implement unit tests to validate the new class and properties.
Provide example instances demonstrating the use of the new class and properties.
@prefix uco: https://unifiedcyberontology.org/uco# .
@prefix owl: http://www.w3.org/2002/07/owl# .
@prefix xsd: http://www.w3.org/2001/XMLSchema# .
Define the ChildExploitationCrime class
uco:ChildExploitationCrime a owl:Class ;
rdfs:subClassOf uco:CyberCrime ;
rdfs:label "Child Exploitation Crime" ;
rdfs:comment "A crime category specific to offenses that involve the exploitation of children." .
Define properties specific to the class
uco:victimAgeRange a owl:ObjectProperty ;
rdfs:domain uco:ChildExploitationCrime ;
rdfs:range xsd:string ;
rdfs:label "Victim Age Range" ;
rdfs:comment "The age range of the victim(s) involved in the child exploitation crime." .
uco:crimeType a owl:ObjectProperty ;
rdfs:domain uco:ChildExploitationCrime ;
rdfs:range xsd:string ;
rdfs:label "Crime Type" ;
rdfs:comment "The specific type of child exploitation crime, such as grooming, trafficking, or possession of illicit material." .

This proposal was posted as part of the DFRWS-USA 2024 Rodeo event, which comprised of a set of forensic capture-the-flag challenges.  I did not suggest or develop this challenge, but I did agree to judge submission completeness.  The challenge prompting this proposal read:

Category: Project Vic
Title: Shape_The_Future
Create and submit a change proposal to the Unified Cyber Ontology project on Github that presents a new or updated concept related to crimes against children investigations. Submit link to the change proposal in Github as the flag.
Link to the Unified Cyber Ontology: https://github.com/ucoProject/UCO/tree/master/ontology/uco
Link to the project's Change Request template: https://github.com/ucoProject/UCO/issues/new?assignees=&labels=change+request&projects=&template=change-request.md&title=
You will need a GitHub account to login and submit the change proposal.
To get credit for the flag, the change proposal form needs to be completely filled out.

Hello @minissan ,
Thank you for posting this proposal.
It is too close in our review cycle for discussion in tomorrow's CDO Ontology Committees call, but I will try to review the proposal later this week for discussion in the August 20th call.  Please send me an email if you'd like to participate on that call.
--Alex

This proposal seems to have very heavy overlap with CP #614 .
I would suggest we combine the two together into a single CP.
My comment left on CP #614 apply to this proposal as well.


Updated validations.py python script.

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Closes: #1
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

I've signed it!

@googlebot I signed it!


Version problem

I would like to ask if this library supports Bluetooth 2.0.？

Not at the moment. Bluetooth Classic support is tracked in issue #118


Unable to load FFProbe on Ubuntu 12.04 ?

I know this is a very common issue but after trying the solutions from other issues, the ffprobe still is not found.
I installed ffmpeg via this method  http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu  and the ffmpeg and ffprobe are located in the user path ~/bin. so I export the path to global path in .zshrc by doing so
export PATH="$HOME/bin"

After exporting, the ffmpeg and ffprobe command works perfectly ok. but when I try in PHP code $ffmpeg = FFMpeg\FFMpeg::create();, it keeps throwing the error Unable to load FFProbe

$ffmpeg = \FFMpeg\FFMpeg::create(array(
'ffmpeg.binaries'  => '/usr/bin/ffmpeg',
'fprobe.binaries' => '/usr/bin/ffprobe',
));
you miss a 'f'
it should be
$ffmpeg = \FFMpeg\FFMpeg::create(array(
'ffmpeg.binaries'  => '/usr/bin/ffmpeg',
'ffprobe.binaries' => '/usr/bin/ffprobe',
));

Good catch.


Major update to bidsapp

Full description to come, for now just want the tests to run.
Also, won't be addressing any further fixes until a few upstream PRs are merged, as I don't want to do more than one painful merge

Codecov Report
Attention: 197 lines in your changes are missing coverage. Please review.

Comparison is base (998cca2) 91.60% compared to head (1c06c8c) 70.74%.

Files
Patch %
Lines

snakebids/plugins/snakemake.py
53.09%
53 Missing :warning:

snakebids/plugins/component_edit.py
32.46%
52 Missing :warning:

snakebids/plugins/cli_config.py
40.38%
31 Missing :warning:

snakebids/plugins/base.py
63.63%
16 Missing :warning:

snakebids/bidsapp/run.py
85.85%
14 Missing :warning:

snakebids/plugins/version.py
51.85%
13 Missing :warning:

snakebids/plugins/pybidsdb.py
73.52%
9 Missing :warning:

snakebids/plugins/validator.py
58.33%
5 Missing :warning:

snakebids/plugins/bidsargs.py
91.83%
4 Missing :warning:

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #362       +/-   ##
===========================================
- Coverage   91.60%   70.74%   -20.86%
===========================================
  Files          39       51       +12
  Lines        1727     2058      +331
===========================================
- Hits         1582     1456      -126
- Misses        145      602      +457

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Okay, I think this is ready to go.
A full explanation of the details shall be reserved for the docs, but in summary, this PR creates the bidsapp module with its bidsapp.app entrypoint function. The returned _Runner class a group of action methods that run various portions of the app lifecyle. This cycle is a very minimal skeleton; the life comes from an extensive network of plugins that should be loaded into the app.
The cycle is as follows:

load the config with initial values (e.g. the snakemake plugin uses this to read the config files)
add cli arguments to the argument parser (most plugins make use of this). Following this step, CLI arguments will be parsed
handle unrecognized arguments (the snakemake plugin uses this to handle snakemake args)
handle recognized arguments (giving the opportunity to manipulate the Namespace returned from the argument parser). Following this step, all remaining items in the Namespace are transferred into config
Perform arbitrary actions on the config (the snakemake plugin uses this to set up the output directory)
Perform a run (the snakemake plugin uses this to actually run snakemake)

Each of these steps represents potential sites for plugin hook-in. Plugins are managed using pluggy from pytest, a mature framework that's simple to use and extend.
The run.py template is also changed: instead of an entry function, bidsapp.app() is directly assigned to an app variable. The advantage here is that this app variable could be used in the future as a snakebids specific entrypoint, allowing other apps to discover the workflow regardless of file structure (for instance, bidsapp orchestrator could get direct access to the snakebids api in compatible apps without needing to know details of app internals and without needing to go through the cli). Rest assured bidsapp.app() is a very cheap function call (it just scaffolds the runner without actually parsing arguments or anything), so there's no concern about running code when importing. A similar convention is used for typer CLIs.
The _Runner class will probably be renamed to something public in the future, once its API is stabilized. For now its actions are only related to running the app, but in the future it could have "dry_run", "doc_gen", or other actions. These would create standardized workflow actions completely independent of the underlying architecture (e.g. snakemake, nipype, etc).