Navigator 2.0

Design doc
The goal for this refactoring:

[x] 1. Refactor the imperative api to continue working in the new navigation system

[x] 2. Introduce new page api to Navigator widget for more flexible navigator history modification

[x] 3. Implement Router widget for a more convenience api which wraps navigator widget and utilize the new page api.

Since the design doc mentioned nested Navigators, I wonder whether routing could be something extensible, where Navigator aren't the only widgets representing part of the route. For example:
In our apps, we have a Navigator at the root (the one in WidgetsApp) that we use to navigate between onboarding and daily UI. In Daily UI we have a (custom build) tab bar. Each tab has a Navigator for navigation within the tab (we want each tab to have an independent stack of pages). For one of the inner Navigators (the one showing settings), we'd like to show a different design on large devices, where the first page is shown on the left of the screen and used to select a page on the right side of the screen (a master-detail view, like the iOS Settings app).
To handle deep links, it would be useful if routing could incorporate widgets like a tab bar or a master-detail view.

Hi @chunhtai
How about being able to access the up-to-date context of the current route displayed from within a provider? Do you think it might be relevant?
Here's an issue I opened in which I'm explaining why it's not possible today:
https://github.com/flutter/flutter/issues/50231

Ah, I forgot to make an issue about that issue.
I agree with @royibernthal that currently (and it'll get worse with Navigator 2.0), showing overlays in response to an InheritedWidget state change is not great.
We had some sort of solution, that is didChangeDepencencies. But it recently broke on the master channel (see #49527).
In my opinion, Navigator 2.0 should also include an Overlay 2.0 with the same reasoning than Navigator:
OverlayEntry is currently imperative, and this is bad.
So it'd be great to have a declarative Overlay manipulation instead.
That's how React deals with overlays.
This would completely solve the "showing overlays in answer to an InheritedWidget change" issue, as it'd just be our typical build method doing its work.
I made an implementation of such declarative Overlay very recently actually: https://github.com/rrousselGit/flutter_portal. It's tested and most features are implemented – feel free to take a look.
It's up to the team to think about it, but I am convinced that this flutter_portal thing should not be as a package since it's literally OverlayEntry.
Also, all functions like showDialog, showSnackbar, ..., should be made declarative too, not just OverlayEntry.
If needed, I'm open to discussing with the team, make an issue, or potentially make a design doc (although I'd like to avoid the latter – too much work for me).

@rrousselGit I am not sure if I understand, how would Navigator 2.0 makes the overlay issue worse?
I would like to separate out the overlay entry issue from the navigator refactoring as it is already pretty complicated. Would you open up a new feature request for merging the library and we can continue our discussion there?

Sure. I'll do that

Done in #50961
For what it's worth:
I think these two issues are related because if OverlayEntry is declarative, then Navigator is declarative too by default.\
By that I mean Router used this way:
Router(
  routes: [
    Route(path: '/', child: Home()),
  ],
)

Is basically the equivalent a declarative OverlayEntry used this way:
Overlay(
  overlays: [
    OverlayEntry(overlay: Home()),
  ],
)

with a few extras to handle paths.

It's also worth noting that if such Overlay 2.0 becomes a thing, then it would enable showing "detail" routes from within another route.
For example consider our typical Todo app, with two views:

Home, which shows a list of todos
TodoDetails, which shows a page for a specific todo

Then with an Overlay 2.0, then we could write:
class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  List<Todo> todos;
  Todo focusedTodo;

  @override
  Widget build(BuildContext context) {
    return PageRoute(
      visible: focusedTodo != null,
      onClose: () => setState(() => focusedTodo = null),
      page: TodoDetails(todo: focusedTodo),
      child: ListView.builder(
        itemBuilder: (context, index) {
          final todo = todos[index];
          return ListTile(
            onTap: () => setState(() => focusedTodo = todo),
            title: Text(todo.description),
          );
        },
      ),
    );
  }
}

The Vue router is the best simple router implementation I’ve seen in the wild. You define nested routes and then nest navigators and it handles things like tab views.

/cc @chunhtai https://github.com/flutter/flutter/pull/44930#issuecomment-585796878

@slightfoot I just replied to the comment, let me repost it and let's continue the discussion here.
In reply to  https://github.com/flutter/flutter/pull/44930#issuecomment-585796878
The pushAndRemoveUntil that add the route without an animation is an unexpected behavior, because it should be a "push".
The code you posted in createAnimationController is more like a workaround to get rid of animation when it is an initial route, and that creates an unexpected behavior as you mentioned. In my opinion, this is more of a bug fixes instead of a breaking change.
Back to your question, to achieve the same result without transition, you can use replace to replace the top most route, and use remoteRoute or removeRouteBelow to remove the route below. The problem with this approach is you have to have the reference of the route in current history, you might need to keep track of them yourself which is a bit cumbersome. The use case you demonstrate here is actually the reason why we want to do the refactoring and page api.
Let me know if you have any questions or concerns.

@slightfoot
in reply to https://github.com/flutter/flutter/pull/44930#issuecomment-591641678
We are in the middle of implementing the functionality to modify initial route, which is the page api and Router Widget in Navigator 2.0
Changing the replacing the routes stack is still possible as i mentioned in my previous comment  https://github.com/flutter/flutter/issues/45938#issuecomment-591606048 using replace and removeRoute.
It might be hard or even impossible to manage the stack until the Router widget is implemented, but rely on the unexpected bug to do that is not right way to do it, neither.
We should not treat the changing behavior in the pushAndRemoveUntil as a breaking change. Otherwise, every bug fixes can as well be a breaking change.

@chunhtai what part of this do you see as a bug?

@slightfoot pushAndRemoveUntil should come with pushing animation, otherwise, it should call replaceTopAndRemoveUntil or something.
I should say it is ok to use pushAndRemoveUntil to reset the stack, but pushAndRemoveUntil should have pushing animation even if the route being pushed has isInitialRoute set to true.

@chunhtai will Navigator 2.0 have a difference between Back Navigation and Up Navigation?
AFAIK Flutter currently only has Back Navigation, but if a user gets inside our app by a link that leads to a given screen there's no way that I know of to construct a fake back history to serve as Up Navigation. That is, if we have screens A, B and C, whereas A leads to B and B leads to C, and the user gets to C through a link, or an Intent, the Back Button should go the previous App, but the Up Button on the AppBar should take us to screen B.
A real life example: On Android, if the Gmail App gets an Intent to write a new email it will open directly on the New Email screen. If we hit the Back button, we go back to the App that triggered that Intent (could be Chrome if we clicked a mailto: link), but if we click the Up Button on the AppBar, we go to the Gmail main page, where it shows our email history.

@feinstein unless I've misunderstood, it sounds like you want deep linking that from my understanding can be achieved through https://api.flutter.dev/flutter/widgets/Navigator/initialRoute.html. It gives an example in the API docs. Does lack the ability to be able to pass extra info though e.g. via a query string

Yes I was meaning deep linking, but I can't find any good examples on it. That lack extra parameters could be fixed on Navigator 2.0 I guess.

Is it intentional that the pages list of the root navigator is not propagated to the MaterialApp in 1.17.0?

Is it intentional that the pages list of the root navigator is not propagated to the MaterialApp in 1.17.0?

Yes, because we eventually want developer to use router widget which solves a lot of other issues.
For now, you have to use builder to build a navigator that uses pages.

@feinstein It is doable in navigator 2.0, we separate out the android back button (the back button) and and navigator.pop (the up button). Most of app should link it together, but you can customize it in the new design.
One thing that may be tricky is that how would you want to deal with these following cases.
1, user enter the app on page A, and go to page B, and hit android back button
2, user enter the app through deep link /A/B and hit android back button
If the above two situations respond differently, you will have to figure out how to differentiate these two cases.

Well, IMHO Flutter being a multi-plataform framework should do this automatically for us, following the latest Android specifications on how to deal with "go back" and "go up". It shouldn't be on us to deal with all those edge cases depending on platform.
Android programmers don't do it, so also we shouldn't. I think this mechanism should be inside Navigator 2.0.

Great to see progress with Navigator 2.0.
I'm trying to use the new API, but stuck, how to do it correctly.
@chunhtai
Could you take a look, please?
https://gist.github.com/t-artikov/17b87025ece847763abb9a41437b06a2
There is a stack of page names in AppState that are mapped to Navigator pages.
The problem is that when you press the AppBar Back button, an error occurs:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 2397 pos 12: 'isPresent': is flutter: not true
I am trying to implement the onPopPage handler according to the documentation, but apparently I'm doing something wrong.

Hi @t-artikov Thanks for trying the API out!
The issue is that in _popPage that the appstate.pop() trigger another rebuild to remove the page that has been pop during final bool success = route.didPop(result);.
I think the right fix to your code is the following
  bool _popPage(Route<dynamic> route, dynamic result) {
  final success = route.didPop(result);
  if (success) {
    appState.pages.removeLast();
  }
  return success;
}

The complete gist can be found here https://gist.github.com/chunhtai/787f4e8719332cdbad1f7611a491af80
On the other hand, the navigator should not crash in such case. The same thing can also be reproduced by triggering two page update back to back before the removed page finishes popping.
I think there are two action items on my side based your example (Again, Thank you for trying out the page API !!)

The navigator should deal with pages that are already removed but still sitting in the history stack because it has not finished popping.

Updates the documentation on Navigator.onPopPage that it should not trigger a rebuild, so that we don't waste time rebuilding the navigator.

Can this be already tested as a whole? If yes, on which flutter channel? I understand this is being pushed and merged into master actively, but are the specs already available in master?

@chunhtai, I went ahead and tried the new API (it seems I already used it partially in my PoC: https://github.com/mahmoudajwad/flutter_pokedex without knowing), and I based my attempt on your gist you last mentioned here. I was able to reactor it for my use, and it's great--Finally, I know how to use pages attribute of Navigator class. My concern is how can I pair this with WillPopScope? I tried a lot of combinations but all failed and didn't get WillPopScope to be triggered. I tried adding WillPopScope as root Widget in main function, such as:
void main() {
  final app = new WillPopScope(child: MaterialApp(
    builder: (context, _) {
      return AnimatedBuilder(
        animation: appState,
        builder: (context, _) {
          return _buildNavigator();
        },
      );
    },
  ), onWillPop: () async {
    return false;
  });
  runApp(app);
}

, or, as the built Widget from _buildNavigator function as:
WillPopScope _buildNavigator() {
  return new WillPopScope(
      child: Navigator(
        key: appState.navigator,
        onPopPage: _popPage,
        pages: appState.pages.map(_buildPage).toList(),
      ),
      onWillPop: () async {
        return false;
      }
  );
}

, but this also didn't get WillPopScope to be triggered. Any hint on this direction?

If you set the name when creating Page. The OS back button will be handled in router widget. For now, if you want to handle it manually, you can implement WidgetsBindingObserver.didPopRoute and trigger the navigator.pop in the method.
For the willpopscope problem. It is hard to tell what are the problem or what use case you are trying to achieve by just looking at the code snippet, can you talk more about your use case? The willpopscope in you code will not trigger because it is not wrapping the page content that the navigator wants to pop, but i can't give more advise on how to fix it until i know more about the use case.

Is there anything tracking the status of Navigator 2.0? I can't tell if this thing is fully implemented, partially implemented, and what branch its' currently on?

Is there anything tracking the status of Navigator 2.0? I can't tell if this thing is fully implemented, partially implemented, and what branch its' currently on. Does this deserve it's own milestone?

It seems like some bits are even on stable branch now, but the main missing piece is the Router widget.

the pages api is in stable, although there is some limitation which can be workaround as i mentioned https://github.com/flutter/flutter/issues/45938#issuecomment-621521786
This issue will remain open until router widget is implemented. I didn't separate out the page api to its own issue because it cannot be used directly(not exposed in MaterialApp), so it is not really a standalone feature.

I was wondering if Navigator 2.0 will keep the current route in a variable which we can access from anywhere like:
if (Navigator.currentRouteName == "chats/pighetti/info/media/") {
    //show toast
}

We might need to use some wildcards (like Firebase Cloud Functions work for collection/document/collection/document/..)
Let's say I don't care which users chat screen I am in as long as I am in a users info page:
"chats/pighetti/info/"
"chats/chuntai/info/"
Will the Api allow us for all these cases:
if (Navigator.currentRouteName == "chats/$userId/info/") {
    //do info related stuff
}

Let's say app received a push notification and app is in the foreground. I need to know in my business logic class which route address user is on currently  in order to show an in-app notification toast or not. (If user is already on the chat page with x person, no need to show a toast). Does Navigator 2.0 make this case easier. Also I wish it will be easier to integrate Navigator 2.0 in to state management solutions. I always thought navigation is more of a business logic than UI.

I was wondering if Navigator 2.0 will keep the current route in a variable which we can access from anywhere like:
if (Navigator.currentRouteName == "chats/pighetti/info/media/") {
    //show toast
}

We might need to use some wildcards (like Firebase Cloud Functions work for collection/document/collection/document/..)
Let's say I don't care which users chat screen I am in as long as I am in a users info page:
"chats/pighetti/info/"
"chats/chuntai/info/"
Will the Api allow us for all these cases:
if (Navigator.currentRouteName == "chats/$userId/info/") {
    //do info related stuff
    print("currently viewing $userId info screen");   //currently viewing Pighetti info screen
}

Let's say app received a push notification and app is in the foreground. I need to know in my business logic class which route address user is on currently in order to show an in-app notification toast or not. (If user is already on the chat page with x person, no need to show a toast for a message from x). Does Navigator 2.0 make this case easier. Also I wish it will be easier to integrate Navigator 2.0 in to state management solutions. I always thought navigation is more of a business logic than UI.

One thing you can do now if you need it, is to use popUntil() to check the topmost route. You can do that like this:
     Navigator.of(context).popUntil((route) {
        print(route.settings.name); // Current route name
        return true; // Return true so we don't actually pop the route
      });

I have a route configuration as below:

/a/b => BWidget
/a => AWidget
/ => HomeWidget

Currently, when navigate to /a/b, Flutter will build all 3 Widgets. It's quite strange behaviour to me and produces bugs in my application.
As an Angular developer, only BWidget should be loaded and route matching should stop right after the first match (in the order user defined) is found.
Will Navigator 2.0 change this behaviour to the way Angular does?

I think that's a stack question, but the today solution is to only nest things that you want people to be able to hit back to go back to.
ie /a/b you can go back to /a and then back to /
If you need these all independent you can do
a
b
/

Not sure if this is helpful, but the today solution is to only nest things that you want people to be able to hit back to go back to.
ie /a/b you can go back to /a and then back to /
I don't thing that's a good design. The history of back/forward should not related to the route path at all. I can open /a/b/c from /d/e/f, so the back should jump directly to d/d/f, not /a/b.

So the history of back/forward is related to the route path:
If intitialRoute is /a/b, it pushes / then /a, then /a/b, for the purpose
of going back
Le lun. 29 juin 2020 à 12:45, Nguyen<EMAIL_ADDRESS>a écrit :

Not sure if this is helpful, but the today solution is to only nest things
that you want people to be able to hit back to go back to.
ie /a/b you can go back to /a and then back to /
I don't thing that's a good design. The history of back/forward should not
related to the route path at all. I can open /a/b/c from /d/e/f, so the
back should jump directly to d/d/f, not /a/b.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/45938#issuecomment-651062209,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEZ3I3JYTAAMX7H3KUAJOP3RZB5GBANCNFSM4JUL5JXA
.

So the history of back/forward is related to the route path: If intitialRoute is /a/b, it pushes / then /a, then /a/b, for the purpose of going back

Firstly, I think we should differentiate 2 kinds of navigation:

UP TO PARENT SCREEN: navigate to parent screen in route path
BACK TO PREVIOUS SCREEN: navigate to previous screen, regardless of route path

These navigation strategies should be under the control of developers. Framework should not force to use the current UP TO PARENT SCREEN approach.

Secondly, in the list of routes (ordering) below:

/a/b => BWidget
/a => AWidget
/ => HomeWidge

If user want to jump directly to /a/b, we should only build BWidget.
Why do we need to build also AWidget and HomeWidge, just because we want to add them to the history stack?
Building all parent screens in the route path could introduce bugs in our applications.
If developer want the UP TO PARENT SCREEN strategy, could we have a way to put parent screens in the stack without building them?
We should only build a screen when we want to show it to user. Otherwise, don't touch any unneeded screen.
All good frontend frameworks out there, like Angular, did a very good job for navigation strategies.
The router configuration in Angular is extremely reliable, predictable and flexible.
Why don't we just learn from them?

I agree that the path nesting being explicitly tied to route layering is not ideal. It's a quick way to get basic functionality in a basic app but in a full sized app we usually throw it away and don't use paths.

Hello, everyone, I implemented my ideas about navigation based on an existing navigator in this library, probably you will find something interesting =) https://github.com/Renesanse/osam_flutter

@chunhtai, I went ahead and tried the new API (it seems I already used it partially in my PoC: https://github.com/mahmoudajwad/flutter_pokedex without knowing), and I based my attempt on your gist you last mentioned here. I was able to reactor it for my use, and it's great--Finally, I know how to use pages attribute of Navigator class. My concern is how can I pair this with WillPopScope? I tried a lot of combinations but all failed and didn't get WillPopScope to be triggered. I tried adding WillPopScope as root Widget in main function, such as:
void main() {
  final app = new WillPopScope(child: MaterialApp(
    builder: (context, _) {
      return AnimatedBuilder(
        animation: appState,
        builder: (context, _) {
          return _buildNavigator();
        },
      );
    },
  ), onWillPop: () async {
    return false;
  });
  runApp(app);
}

, or, as the built Widget from _buildNavigator function as:
WillPopScope _buildNavigator() {
  return new WillPopScope(
      child: Navigator(
        key: appState.navigator,
        onPopPage: _popPage,
        pages: appState.pages.map(_buildPage).toList(),
      ),
      onWillPop: () async {
        return false;
      }
  );
}

, but this also didn't get WillPopScope to be triggered. Any hint on this direction?
UPDATE: More concerns:
I was able to refactor the PoC into something that has nested navigator that work. I still have little of an issue about handling OS back button/gesture but I believe some more time on this can resolve it. My concern now is that I lost the named route feature--If I use Navigator.pages and .onPopPage then these nested histories are not reflecting on the app named route. Is there any way we can still have that reflecting so that the app built for the web can still expose the route as URI?
UPDATE 2: PoC has now branch navigator-2 reflecting changes made to get Navigator 2.0 API to work on current nested Navigator with named route structure for reference.

@mahmoudajawad  on the first WillPopScope in function onWillPop  you need check maybePop for your Navigator. When you call MaybePop it will trigger func onWillPop of nested WillPopScope to check should be considered handled.
Do you tried use func MaybePop on WillPopScope ?

@dangngocduc
The WillPopScope need to wrap the page content below the navigator for example
MaterialPage(
   builder :(context) {
      return WillPopScope(
        child:  Text('do not pop'),
        onWillPop: () async {
          return false;
        }
     )
   }
)

@chunhtai Yes, but when you have 2 navigator.

WillPopScope1

Navigator1

WillPopScope2

Navigator2

If you want receive a trigger onWillPop for WillPopScope2 (on sample of @mahmoudajawad mention), I will need call Navigator.of(context).maybePop() on onWillPop of  WillPopScope1.

I know I'm posting it quite late and haven't read all the posts just a note: @chunhtai have you thought of adding more (ideally lots of) possibilities for navigation animations for Navigator 2.0?

@chunhtai Yes, but when you have 2 navigator.

WillPopScope1

Navigator1

WillPopScope2

Navigator2

If you want receive a trigger onWillPop for WillPopScope2 (on sample of @mahmoudajawad mention), I will need call Navigator.of(context).maybePop() on onWillPop of WillPopScope1.

Yes that is a known issue when you are nesting willpopscope. If the reason you are using willpopscope is to handle android back button, you will be able to use back button dispatcher when the router widget is available which is much easier to use.
@tomasbaran That is not part of the Navigator 2.0.

Is this closed because Navigator 2.0 is done?

@lukepighetti yes the router widget is in master now https://master-api.flutter.dev/flutter/widgets/Router-class.html

It is also available in MaterialApp/CupertinoApp https://master-api.flutter.dev/flutter/material/MaterialApp/MaterialApp.router.html

Does that mean everything is done?
Because from my understanding, we are lacking built-in implementations of RouterDelegate.
I don't see beginners jumping from the counter application to making a custom RouterDelegate.

The Navigator 2.0 only includes up to finishing the widgetsapp.router api. We do have plan to add more opinionated router delegates and parsers, but I figure out this may be a good place to draw a line to separate it out into a separate project because the navigator 2.0 is already massive.
I will create a new issue to keep track of those opinionated classes separately.

https://github.com/flutter/flutter/issues/63429 <-- tracking issue for I created for making router more accessible to developers

The last release of flutter is 1.20.2 that was 2 days ago but it is missing the Router.
Am I missing something?

Router is on master channel. Pages API is on stable.
On Sat, 15 Aug 2020, 19:01 Kristián Balaj<EMAIL_ADDRESS>wrote:

The last release of flutter is 1.20.2 that was 2 days ago but it is
missing the Router.
Am I missing something?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/45938#issuecomment-674430198,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAG5KRFUFFGWOEIE63GIW2TSA3EQLANCNFSM4JUL5JXA
.

Here is a short gist based off of #63424. We plan to address https://github.com/flutter/flutter/issues/63429 soon.

I just came across this, really awesome stuff. Is there any ETA on when this will hit stable?

I just came across this, really awesome stuff. Is there any ETA on when this will hit stable?

Pages API is on stable already, and Router widget is available in current beta (1.22). You can take a look at the docs here (master version).

If anyone wants a tutorial/examples on the new APIs check out my talk.

Video: https://www.youtube.com/watch?v=Y6kh5UonEZ0
Slides: https://bit.ly/flutter_nav_v2
Code: https://github.com/slightfoot/flutter_nav_v2

In addition to @slightfoot's links, there's now a Medium article: https://medium.com/flutter/learning-flutters-new-navigation-and-routing-system-7c9068155ade

Hi chunhtai
I use the "Router" class without using MaterialApp.router:
`@override
Widget build(BuildContext context) {
final HomePageRepository homePageRepository = HomePageRepository();
return NotificationListener<UserScrollNotification>(
  onNotification: _handleNotification,
  child: RepositoryProvider.value(
    value: homePageRepository,
    child: BlocProvider(
      create: (_) => HomePageBloc(
        homePageRepository: homePageRepository,
      ),
      child: Scaffold(
        key: GlobalKeys.homeScaffold,
        //appBar: _buildAppBar(),
        body: Router(
          routeInformationParser: routerParser,
          routerDelegate: routerDelegate,
        ),
        //drawer: _buildDrawer(),
        bottomNavigationBar: _buildNavBar(),
      ),
    ),
  ),
);

}`
I seem to notice "Router" doesn't call on routeInformationParser and routerDelegate.
Please let me know if this is really true with the api router?
Thanks

@anhln8x if you provide routeInformationParser, you will also need to provide routeInformationProvider. It looks like our assert on Router is not strict enough, i should update it.

@chunhtai I use the "Router" class without using MaterialApp.router
routerDelegate do not call setInitialRoutePath and setNewRoutePath, not print "setInitialRoutePath", "setNewRoutePath"
`  @override
Future setInitialRoutePath(String configuration) {
print('setInitialRoutePath');
return setNewRoutePath(configuration);
}
@override
Future setNewRoutePath(String configuration) {
print('setNewRoutePath');
_stack
..clear()
..add(configuration);
return SynchronousFuture(null);
}`
Please let me know where i got confused?

@anhln8x yes, I understand your situation. The reason setNewRoutePath is not called is because you do not provide routeInformationProvider to the Router widget. That means there is no route path for the router to process because it is routeInformationProvider's job to hand the route path to the router, thus those methods are not called.

@chunhtai I see, can you give me an example of routeInformationProvider?

@anhln8x You can take a look at PlatformRouteInfromationProvider for a comprehensive example
Here is a pretty simple example
class MyRouteInformationProvider extends RouteInformationProvider with ChangeNotifier {
  MyRouteInformationProvider({
    RouteInformation initialRouteInformation
  }) : _value = initialRouteInformation;

  @override
  RouteInformation get value => _value;
  RouteInformation _value;
  set value(RouteInformation other) {
    if (value == other)
      return;
    value = other;
    notifyListeners();
  }

  // optional
  @override
  void routerReportsNewRouteInformation(RouteInformation routeInformation) {
    _value = routeInformation;
  }
}

@chunhtai would you say the best place to maintain a stack is inside the router delegate?

@Milad-Akarie you can save it in the app state and passes it to the router delegate to mutate the state, or you can store solely in the router delegate, that depends on what works the best for your application

Is there a way to set the default animation for a material page? Currently everything work except the sliding animations to and from pages.

Is there a way to set the default animation for a material page? Currently everything work except the sliding animations to and from pages.

Make sure you set a unique value key to each page item in the pages list.

If I remove a middle page, I get an error.
import 'package:flutter/material.dart';

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

class FluroExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Fluro',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Navigator(
        pages: [
          MaterialPage(
            key: Key('1'),
            child: TestPage("Foo 1"),
          ),
          /// Build once, then change this `true` to `false`, the error will throw
          if (true)
            MaterialPage(
              key: Key('2'),
              child: TestPage("Foo 2"),
            ),
          MaterialPage(
            key: Key('3'),
            child: TestPage("Foo 3"),
          ),
        ],
        onPopPage: (route, result) => route.didPop(result),
      ),
    );
  }
}

class TestPage extends StatelessWidget {
  const TestPage(this.text, {Key key}) : super(key: key);

  final String text;

  @override
  Widget build(BuildContext context) {
    return Material(
      child: Center(
        child: Text(text),
      ),
    );
  }
}

════════ Exception caught by widgets library ═══════════════════════════════════
The following NoSuchMethodError was thrown building AnimatedBuilder(animation: Listenable.merge([AnimationController#92f0b(⏭ 1.000; paused; DISPOSED; for _PageBasedMaterialPageRoute<dynamic>(null))➩ProxyAnimation, AnimationController#29d44(⏭ 1.000; paused; for _PageBasedMaterialPageRoute<dynamic>(null))➩ProxyAnimation➩ProxyAnimation]), dirty, dependencies: [_InheritedTheme, _LocalizationsScope-[GlobalKey#01964]], state: _AnimatedState#7230d):
The getter 'userGestureInProgress' was called on null.
Receiver: null
Tried calling: userGestureInProgress

The relevant error-causing widget was
Navigator
lib/main.dart:16
When the exception was thrown, this was the stack
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      CupertinoRouteTransitionMixin.isPopGestureInProgress
package:flutter/…/cupertino/route.dart:174

If I swipe back on iOS this returns me to page 1. I would expect it to return me to page A.
import 'package:flutter/material.dart';

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

class FluroExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Fluro',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Navigator(
        pages: [
          MaterialPage(
            key: Key('1'),
            child: TestPage("1"),
          ),

          /// Nested Navigator
          MaterialPage(
            key: Key('2'),
            child: Navigator(
              pages: [
                MaterialPage(
                  key: Key('A'),
                  child: TestPage("A"),
                ),
                MaterialPage(
                  key: Key('B'),
                  child: TestPage("B"),
                ),
              ],
              onPopPage: (route, result) {
                return route.didPop(result);
              },
            ),
          ),
        ],
        onPopPage: (route, result) {
          return route.didPop(result);
        },
      ),
    );
  }
}

class TestPage extends StatelessWidget {
  const TestPage(this.text, {Key key}) : super(key: key);

  final String text;

  @override
  Widget build(BuildContext context) {
    return Material(
      child: Center(
        child: Text(text),
      ),
    );
  }
}

Is there any particular reason why onPopPage isn't (route, result)=>route.didPop(result) by default?

If we want to update our state when onPopPage is fired, how can we match a page to a route? I would have expected to see something like route.page.key for me to work with. I see no way to relate this route back to any Page.

In the design documentation it states

A Router widget is available that wraps the Navigator and reconfigures its history stack based on system events and app state, supporting the following:

The Router can configure the Navigator to show the initial route requested by the operating system when the app launches.
The Router can reconfigure the Navigator when a new intent (e.g. from the operating system) arrives to show the route specified by that intent.
The Router can reconfigure the Navigator appropriately when the user hits the system back button to pop the topmost route.
The developer can instruct the Router to reconfigure the Navigator's history stack to his/her liking, e.g. to show new routes in response to user interactions.

However, Router has no place to put a Navigator in the constructor arguments, and I see no place for it in RouteInformationParser, RouterDelegate or RouteInformationProvider.

Is there any particular reason why onPopPage isn't (route, result)=>route.didPop(result) by default? Is it common to use another pattern?

No, it should try to update the page list or app state that will create the page list

If we want to update our state when onPopPage is fired, how can we match a page to a route? I would have expected to see something like route.page.key for me to work with. I see no way to relate this route back to any Page.

you can do
final Page<dynamic> page = route.settings as Page<dynamic>;

but usually you know what currently page in the page list, you can remove that directly.

However, Router has no place to put a Navigator in the constructor arguments, and I see no place for it in RouteInformationParser, RouterDelegate or RouteInformationProvider.

You can build a navigator in RouterDelegate.build method.
You can talk a look at this app for example https://github.com/flutter/flutter/pull/63424
or this post https://medium.com/flutter/learning-flutters-new-navigation-and-routing-system-7c9068155ade

Excellent work with Navigator 2.0.
I noticed that when we call Navigator.pop on the first screen it performs the outgoing transition. I would be able to prevent this when there is only one Page.
In onPopPage I am doing this to try to hold the exit announcement but to no avail;
if (route.isFirst) {
      return false;
}

Hi @jacobaraujo7 this should work, in the onPopPage did you call didPop on the Route? if so, that will trigger the exiting animation. It is hard to tell without the code. can you provide the example app if you are still facing the issue?

@chunhtai Thanks for all of your hard work.
any hint on how to report nested path information to the browser?
e.g /book/1/page/3 where /page/3 is a nested page inside of a nested router widget.

Only the top most router should handle the route information, it should parses everything into some form of data and hand that data to the sub router. The sub router should only takes in an RouterDelegate and BackButtonDispatcher. The RouterDelegate should ignore setNewRoutePath method but just write the build and popRoute method.

Thanks for the answer!
I believe I have solved the problem.
I will take the opportunity to report a behavior that I found strange.
Taking the code of the Navigato 2.0 article as an example, I am testing a scenario similar to Naviigator.pushReplacement():
 @override
  Widget build(BuildContext context) {
    return Navigator(
      key: navigatorKey,
      pages: [
        if (_selectedBook == null)
          MaterialPage(
            key: ValueKey('BooksListPage'),
            child: BooksListScreen(
              books: books,
              onTapped: handleBookTapped,
            ),
          ),
        if (_selectedBook != null) BookDetailsPage(book: _selectedBook)
      ],

The back button appears for a few milliseconds while the animation is happening and then disappears.
Debuting I realized that canPop is passed as True causing both screens to show AppBar.leanding.

@jacobaraujo7 It looks like a bug with the default transition delegate. Can you file a new issue for this? and also please ping me on the issue, so i can follow up on it.

It seems that the problem has already been reported in this issue [#67277], but it was closed without a solution. Can we continue on it? @chunhtai

@chunhtai I tried to create a wrapper for this new router system and I have completely given up on a problem with it that I'm facing. I can't, for the life of me, figure out why my state data will not persist.
This system is still obviously unpolished but:
Here's the class I wrote that tries to wrap the system.
https://gist.github.com/581c092a343dd4d38452ccd03b0c992b
The goal was to use the same data for both state and delegate/information parser.
My usage is as such here:
https://gist.github.com/17d6f822a457d6a059b2d83950965986
The build method here is just my MaterialApp with all the theme data and the variables passed here into Materia.router.
It looks complicated at first, but it's quite simple. I tried to document a lot of the router class to make sense of it for myself, it explains my train of thought into writing this thing. It's literally just a wrapper right now that's goal is to use the same data class for state and navigator classes.
If you look here:
        pageStackBuilder: (data, updateRouteData) {
          /// truncated
          return <PageWrapper>[
              /// truncated
              PageWrapper(
                  identifier: '/c/${data.chunkId ?? 'root'}${data.branchId == null ? '' : '/${data.branchId}'}',
                  onPop: (data) {},
                  child: HomePage(updateRoute: updateRouteData)),

In HomePage, I have the following code that navigates to the settings page:
onTap: () => widget.updateRoute(RouteData(page: '/settings')),

What this will do is call this in the router class:
pageStackBuilder(currentData, (newRouteData) {
/// HERE
        currentData = newRouteData;
        notifyListeners();
      })

currentData in the state class is now updated, notify listeners gets called and then the build method rebuilds, which will update the PageWrappers in pageStackBuilder, which will update the MaterialPage widgets inside, this will cause pageStackBuilder to rebuild the pages in the main.dart class. The issue then appears, the currentData that shows up in the build method in the main class is OUTDATED or RESET, I can't tell which. The signInStatus in RouteData is set to DONE on app load, once that happens, we go to settings, the routeData signInStatus shows it's not done for whatever reason, which causes the auth page to flash for a second and then realize the user is authenticated and then set the status to done again, which will close it in under a second.
Basically, currentData seems to reset or not update or not persist whenever the state changes in the navigator class and I don't know why.
Here's the console log of all the print() methods in the router class:
I/flutter ( 6156): build /// router builds pages
I/flutter ( 6156): AuthStatus.TRYING - true /// Auth status resets to not done??????? This shouldnt happen! why did it not persist? It was DONE earlier
I/flutter ( 6156): called current config
I/flutter ( 6156): restore route
-------------------- Auth status set to DONE again because the AUTH page appeared because status was TRYING, user is not null so it quickly resolves to DONE again which causes an update to the navigator again. --------------------
I/flutter ( 6156): build
I/flutter ( 6156): AuthStatus.DONE - true
I/flutter ( 6156): called current config
I/flutter ( 6156): restore route

I genuinely don't know why the data does not persist. I tried the navigator 2.0 example in the medium article and it seems to work fine. I've went over this code a million times, what am I missing?

@chunhtai Hello, how do we update the URL bar without updating the widget state with the new router system?

@SwissCheese5 when the fetch done, it must know which book id it fetched, you can set the id somewhere in the app state. Your router delegate should listen to the app state and notify its listener when the app state changes. This will cause the router to rebuild and report the URL back to engine.

Or a more realistic example would be a change in app state without changing to a new MaterialPage

You need to notify the listener of routerdelegate. The router will report new url back to engine if you hook up the appstate to the currentConfiguration/restoreRouteInformation.

@chunhtai Okay, one criticism I have of this new system is that it is not portable. Given your book example, For applications that practice significantly more complexity, you would need to pass _handleBookTap very very deep into several widget classes for it to handle routing, whereas with the old system, I could just use Navigator.of(context).
Is there a better way to do this? I would rather not have to create a whole Provider/Bloc system just to pass data to my router. That is completely against the design principles set by the Flutter team.

you can do Router.of(context).routerDelegate to access the router delegate directly and calls the public method on the routerdelegate to change selected book.
Alternative, the selected book state can be hosted in an inherited widget and the widget subtree can change it directly, you just need to make sure the routerdelegate is listening to the selected book state and notify its listener when it change.

@chunhtai That's excellent news, I wish this were documented somewhere! Is there a more convenient way to cast the delegate object to our one? We need to do (Router.of(context).routerDelegate as BookRouteDelegate).doWhatever(); right now which is a lot of boilerplate...

@SwissCheese5 I think we need more sample apps to show different way to use router. The API doc is supposed to be high level. regarding to casting, what you have is the only way to recast the routerdelegate. You can factor that out to a method though.

Thank you so much. :)
That being said, I've completely abstracted the system into my own wrapper to simplify my code.

Alternative, the selected book state can be hosted in an inherited widget and the widget subtree can change it directly, you just need to make sure the routerdelegate is listening to the selected book state and notify its listener when it change.

While experimenting with Router I made this example (inspired by Simon Lightfoot and Andrew Coutts). This is using ChangeNotifier to expose public facing methods. You can also check out the web demo here. Both navigation and url changes should work.

Shouldn't hitting the back button on the AppBar do the same thing as hitting back on the browser? Is that a detail of your implementation @orestesgaolin or is this just the way Nav 2.0 on web operates?

@lukepighetti They meant different things, we separate out the browser history and navigator route stack. The browser back button means build the app with the previous url, and the back button on appbar means means pop the top most route off the route stack.

Shouldn't that be the same thing in a 100% declarative router implementation?

@lukepighetti
Do you mean appbar back button should work the same as browser backward button, or the browser backward button should work the same as appbar back button?
if you meant the former:
The app bar is originally built with imperative API, so we automatically shows the backbutton when there are multiple routes underneath. This mechanism makes sense for mobile application because mobile has the concept of route stack. If you don't want this behavior you can write your own declarative back button
if you meant the latter:
The previous page can be an arbitrary page, it can be a certain page in the app or a page in a completely different website. The browser backward button is used for bring user back to the previous page. It does more than just popping top most route of the app.

In a fully declarative router where a single input (ie a url string) always results in the same navigator stack shown on screen, then it seems like there should be no difference between the app back button and the browser back button. The app back button cannot mutate the stack, as the router would not longer be declarative. All it should be able to do is go back one item in the router history. It would be up to us to modify the history if we need to layer things a certain way. This is not the same thing as modifying the navigator stack because it's still 100% declarative.

In a fully declarative router where a single input (ie a url string) always results in the same navigator stack shown on screen, then it seems like there should be no difference between the app back button and the browser back button.

I think that's not desired. Imagine opening https://navigator_20_example.codemagic.app/#/details/5 and then pressing browser back button. It would be strange to be moved to details/4 or Home. Natural thing to observe would be to go back to this issue.
The AppBar button, however, is very mobile-oriented so it's relatively normal to go back to the previous page within the app i.e. Home.

Nothing I've said is unique to browsers, especially since Android has a hardware back button.
The situation you describe would be resolved with a method/delegate that builds the nav history on first load, much like how the current navigator does that with /onboarding/start building a stack that is / /onboarding and /onboarding/start.

Friendly ping on this. Maybe the ship has sailed, but I fear that Nav 2.0 is a declarative/imperative hybrid instead of fully declarative. It's my understanding that the core design specification called for it to be 100% declarative.

We make it a hybrid for backward compatibility, you can definitely go full declarative by customizing the behavior for android back button in routerdelegate.popRoute.

@chunhtai do we refrain from awaiting routes for results in favor of passing our own pop functions?

@Milad-Akarie  In a fulling declarative world then yes.  There are still a lot of widget that relies on imperative push/pop, dialog for example, and they makes sense to stay imperative due to their functionality. In those cases, awaiting for route is still useful.

@chulwoo-park me again! if we can decide wether or not to update pages based on our own route-data-models do we still need to use keys? if so, what are your thoughts on having multi entires (same route data) of the same page in our stack?

you can do Router.of(context).routerDelegate to access the router delegate directly and calls the public method on the routerdelegate to change selected book.
Alternative, the selected book state can be hosted in an inherited widget and the widget subtree can change it directly, you just need to make sure the routerdelegate is listening to the selected book state and notify its listener when it change.

This works great, but would you happen to know how to apply it in the case of nested routers (to use a BottomNavigationBar) as in this gist? https://gist.github.com/johnpryan/bbca91e23bbb4d39247fa922533be7c9 I had some problems where providing the app state wasn't triggering route changes, as it looks like someone else did in the comments?


Question: Powershell 7 & BCContainerHelper

As of today we have Powershell 5.1 installed on our machines and we have a bunch of scripts which run on a nightly basis or as adhoc scripts. For scripts using Microsoft Azure, Microsoft recommends to use Powershell 7.x and later.
My understanding is that Powershell 7.x is not fully backwards compatible.
My question is:
What do you recommend? Should we stick to Powershell 5.1 because of BCContainerHelper and use Powershell 7 only for "new" scripts where 7.x is required? Or does BCContainerHelper work with Powershell 7 and we can completely switch off  Powershell 5.1?

BcContainerHelper is not compatible with PS Core (7) - and it is probably a fairly large task to make this happen.
One that I will be looking into - but haven't had time yet.

Thanks @freddydk
Maybe other users of the BCContainerHelper can share how they solve it?
I guess we'll have to stick to 5.1 for a while and only use  7.x  in scripts where really needed.
And in those scripts we have to make sure not to call anything from the BCContainerHelper or other modules which are not Powershell 7.x ready.

@mitrov : we solved this by just not using anything above PS5. I have been able to make a fork of BcContainerHelper that runs in PS7.1+, but I only ever tried to make the "core" cmdlets work (New-BcContainer, Enter-BcContainer a.s.o.) but BcContainerHelper comes with a truckload more stuff.

I think the path forward here is to create a new project called BcContainerHelperCore (or like) and move the things over one by one probably leaving some things behind (everything C/AL and NAV like)
I hope that I will be able to work on this over the summer...

I assume it also depends when the standard BC cmdlets are going to work with Powershell 7?

Not really - the standard BC cmdlets are running inside the container

True that! So should we keep this github issue open so we don't forget about it? :-)

I have it on a todo list as well

If this gets converted to Core, I think we will be able to create docker containers directly in Azure using shell.azure.com. That has a small amount of persistent storage space (so that's where bccontainerhelper can be installed), but it runs in an ubuntu container, which only has core.

In order to make that work it is not "only" a port to core.
It also need to be able to work with ACI's directly.
today BcContainerHelper uses docker commands to communicate with Docker on the host machine - that would need to change as well I think.

Did not mean to offend by over-simplifying :) I'm going to try to make it work by building an image locally first. If I am successful, I will pass along my method (and code). At least my ACI powershell might be useful. But I'm not sure how to avoid the build-an-image-locally step.

No problem
I did investigate whether I could make New-BcContainer spin up ACI's instead of local containers at one point in time.
I didn't complete the work:-(
It would be nice to include this in a PS7 version of ContainerHelper
PS7 version of containerhelper is in the backlog

I am working on this as well. I have the image piece working and can get that uploaded, but I've had to do a bit of hacking to bccontainerhelper to run in the ACI context. Still don't have it working yet, but I am getting there. And I will share my results if I can get it working.

ContainerHelper os now supported on PS7

all non-container functions are also supported on Linux.


Minimum width work

Thank you for Glide. It's awesome. I found some bug

File in attachment cannot be cropper by width less than 156 pixels. At width=156px everything is ok. But at width 155px i see this:

What is wrong? How can I fix this? Thanks!

Same problem here. =/

Hey @Atles and @zvinger - I have the same issue on some picture in my application as well.
Did someone managed to solve it? I found out, that setting the default-quality to 100 will "decrease" the limit, where this breaks. But it is not possible to generate a 10x10 image, nonetheless..
Is @reinink aware of this issue?

This sounds related to https://github.com/thephpleague/glide/pull/310 which has been fixed.


Custom icons renders only in HORIZONTAL mode

Describe the bug
Custom icons renders only in mode=HORIZONTAL
To Reproduce
Follow https://codesandbox.io/s/react-chrono-icon-bug-1leht3?file=/src/App.js
Switch mode to mode="VERTICAL" or mode="VERTICAL_ALTERNATING"
Expected behavior
Gear icon shows on first item in VERTICAL modes.
Screenshots
Please follow codesandbox.
Desktop (please complete the following information):

OS: Win 11
Browser: Edge
Version :  Version 109.0.1518.78

Smartphone (please complete the following information):
not tested

@Krugerro this is now fixed #330


getting error 'Mandatory parameter txnId missing for'

I am doing interation of my site with payu and following
https://www.npmjs.com/package/payu
but getting error.
Mandatory parameter txnId missing for

Hi Deepak,
PayU requires that you send a unique transaction ID (order ID) - It is a required parameter

I am coding like this
var txn_id = '12345tg';
payu.verify_payment(txn_id, function(err, response) {
console.error(response);
res.json(response);
});
where is need to send a unique transaction ID (order ID)?

I have attached PayU's integration document that I used - I think you will
find it useful


I can't click full screen.

Help me,,

this function hasn't been implemented yet.

This function hasn't been implemented yet.

Thank you for reply, and the afterlands background i can't see

Which map id

Which map id ?

867113100 ~ 867113724

Can you hide these?,
thank you..

can you hide these?,,
thank you

Can you hide these?,,
thank you


Add a subsuite of unit tests for ML package and remove them from 'coverage' GHA workflow.

Add a subsuite of unit tests for ML package and run it with all known optional ML dependencies.
The suite should provide early detection signals when an ML dependency creates a new release, and we are no longer compatible with its API, but it could also create noise for us. Given that the ML dependencies are optional for Beam, we don't  set version bounds for these test dependencies. We install a lot of (direct+transitive) dependencies in the ml_test extra ,  and leave dependency resolution up to pip. If dependency resolution becomes messy, we will have the option to tweak the dependencies or introduce more specialized extras.
Compatibility testing  between Beam with specific fine-grained versions of particular dependencies is done in a separate postcommit suite .github/workflows/beam_PostCommit_Python_Dependency.yml.
Moving compat tests from 'coverage' suite reduces the time run the code coverage GHA. Tests that need extra ML deps were not included in code coverage tests previously, keeping it that way for now to reduce coverage runtime, but we can reconsider if we find this signal valuable.
I exclude the apache_beam/ml tests from the main precommit suite, since the new suite includes the same tests + some unit tests that were skipped when optional dependencies are not installed. If this test suite becomes too unstable, we might have to add apache_beam/ml without extra deps back to the precommit suite.
Adding this suite exposed several tests that were not running and not working properly.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

cc: @yathu @damccorm @jrmccluskey


fix transcription title

Coverage remained the same at 92.48% when pulling 1cfa60392116d8edc2cabce5cea5bbcc85eb0b38 on fix-transcript-titling into 3e7487ca498845253842d3ac5a70b76d069ed53a on master.

Coverage remained the same at 92.48% when pulling 1cfa60392116d8edc2cabce5cea5bbcc85eb0b38 on fix-transcript-titling into 3e7487ca498845253842d3ac5a70b76d069ed53a on master.

Coverage remained the same at 92.48% when pulling<PHONE_NUMBER>6715b8541877d9f277af15e8aac7e2 on fix-transcript-titling into 3e7487ca498845253842d3ac5a70b76d069ed53a on master.


Build Charm through tox with local Schemas

Adds build step in tox.ini for building the charm and injecting local SDI schemas into the build zip.
Modify GH Actions and integration tests  with new build step

@DomFleischmann the changes look good, but the tests are failing on GHA.  Want to take a look?

@DomFleischmann the changes look good, but the tests are failing on GHA. Want to take a look?

Yes this still needs the latest changes of this published to pypi, so it is not ready yet.


Fixed Router Example Documentation for TS

I adapted the example to the new session style. I did this only for TS, as it's untested.

sorry guys... I wrote export type MyContext.


Add Arxiv article link to readme

https://arxiv.org/abs/2211.15673 can perhaps be mentioned in the readme.

Done


v6.3.0 connected but nothing shown because of kubectl not downloaded

Describe the bug
Connected to K8s cluster but nothing shown because kubectl was not downloaded, see logs
To Reproduce
Steps to reproduce the behavior:

Build
Connect to k8s
Nothing shown on window

Expected behavior

Screenshots

Environment (please complete the following information):

Lens Version: 6.3.0
OS: MacOs 13.1 on M2 (arm64)
Installation method (e.g. snap or AppImage in Linux): Compiled

Logs:
When you run the application executable from command line you will see some logging output. Please paste them here:
info:    ▪ Downloading kubectl 1.17.17 from https://storage.googleapis.com/kubernetes-release/release/v1.17.17/bin/darwin/arm64/kubectl to /Users/omar/Library/Application Support/OpenLens/binaries/kubectl/1.17.17/kubectl +2s
error:   ┏ [KUBECTL]: failed to download kubectl Response code 404 (Not Found) +219ms
error:   ┃ [ 1] HTTPError: Response code 404 (Not Found)
error:   ┃ [ 2]     at Request._onResponseBase (/Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/got/dist/source/core/index.js:913:31)
error:   ┃ [ 3]     at Request._onResponse (/Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/got/dist/source/core/index.js:948:24)
error:   ┃ [ 4]     at ClientRequest.<anonymous> (/Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/got/dist/source/core/index.js:962:23)
error:   ┃ [ 5]     at Object.onceWrapper (node:events:646:26)
error:   ┃ [ 6]     at ClientRequest.emit (node:events:538:35)
error:   ┃ [ 7]     at ClientRequest.emit (node:domain:475:12)
error:   ┃ [ 8]     at origin.emit (/Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
error:   ┃ [ 9]     at HTTPParser.parserOnIncomingClient (node:_http_client:618:27)
error:   ┃ [10]     at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
error:   ┃ [11]     at TLSSocket.socketOnData (node:_http_client:482:22)
error:   ┃ [12] {
error:   ┃ [13]   name: 'HTTPError',
error:   ┃ [14]   code: 'ERR_NON_2XX_3XX_RESPONSE',
error:   ┃ [15]   timings: {
error:   ┃ [16]     start:<PHONE_NUMBER>668,
error:   ┃ [17]     socket:<PHONE_NUMBER>668,
error:   ┃ [18]     lookup:<PHONE_NUMBER>669,
error:   ┃ [19]     connect:<PHONE_NUMBER>691,
error:   ┃ [20]     secureConnect:<PHONE_NUMBER>732,
error:   ┃ [21]     upload:<PHONE_NUMBER>732,
error:   ┃ [22]     response:<PHONE_NUMBER>874,
error:   ┃ [23]     end:<PHONE_NUMBER>876,
error:   ┃ [24]     error: undefined,
error:   ┃ [25]     abort:<PHONE_NUMBER>878,
error:   ┃ [26]     phases: { wait: 0, dns: 1, tcp: 22, tls: 41, request: 0, firstByte: 142, download: 2, total: 210 }
error:   ┃ [27]   }
error:   ┗ [28] }

Kubeconfig:
Quite often the problems are caused by malformed kubeconfig which the application tries to load. Please share your kubeconfig, remember to remove any secret and sensitive information.
Not a kubeconfig problem, it works with older version.

Additional context
Nothing.

Kind of related here, cluster info goes blak, and then after a refresh (cmd + r) it works. Then, there's no Execute icon to enter a pod nor tail logs:

Kind of related here, cluster info goes blak, and then after a refresh (cmd + r) it works. Then, there's no Execute icon to enter a pod nor tail logs:

I can confirm! (tried now cmd +r)

We are seeing the same issue,  we do not have the kubectl download error

macOS 12.6 Intel

duplicate of #6824


Add pixpress

To make a submission to the Dapps Page, please complete the task lists
below; otherwise remove them.

Your Dapp:

[x] connects to Valora via WalletConnect V1 or DAppKit;
[x] must be mobile-first or mobile responsive;
[x] is in one of the existing categories; and
[x] includes a link to user documentation.

Main needs to be merged into this branch to grab the latest changes.

I am able to connect to the app just fine; however, when attempting swap I am getting 'All assets needs to be approve before swap'. No prompt is being served in Valora to approve the assets and because of this I am unable to swap.
One nitpick is the mobile UI leaves a lot of whitespace to the right on the swap columns.

@MuckT Hi, clicking the lock icon can approve the asset.
But it seems not that intuitive. Maybe I should modify it to a button with approve text?

Hi we've updated the approval button to text, this would be more intuitive.

Thanks for suggestion! this is because it's only one asset, sometimes people swap multiple assets in the same transaction and the rest space gets filled

One nitpick is the mobile UI leaves a lot of whitespace to the right on the swap columns.

Hi @MuckT we've updated our connector, now every transaction will lead to Valora confirmation prompt.

@devarellin - please swap the names to match icons.
Screenshot

Oops, fixed @MuckT please have a look


Update README_zh.md

fixes #221
While reviewing the documentation in the "Usage for Embedding Model" section, I came across a minor issue. The code example provided uses the variable name queries, but it should actually be sentences to ensure consistency with the provided code and instructions.

Thanks for your interest in our work!
We name it queries to indicate it's a typical passage retrieval task. I think both queries and sentences are OK, so there is no need to change it. But still thank you very much for your advice!


Fix for OperationalError: disk I/O error

Fixes: https://github.com/r0oth3x49/ghauri/issues/118
In generate() function conn.executescript(SESSION_STATEMENETS) gives sqlite3.OperationalError: disk I/O error as the session_filepath is readonly.
To solve this issue:

I am creating a temporary .db file in /tmp folder with random alphanumeric name.
conn.executescript(SESSION_STATEMENETS) on the temp db file
Giving read/write/execute permission to the temp file os.chmod(temp_filepath, 0o777)
Copying the temp file back to it's original location shutil.move(temp_filepath, session_filepath)

Also I have given 777 permission to some other files as well, just to make sure everything runs smoothly.

this I/O errors only occurs when the same file is open by two different process for write at the same time. i don't think this is proper solution creating dbs and then merging them this will endup missing things. let say, you extracted injection payloads and it is saved in original session file and the temp one you created for a time being when the original file is being used by some other process once you perform shutil.move it move contents of temp file but original file will be replaced completely. this is not a solution and not even an issue for others so i am closing this as invalid.
you can experiment this on your own. create two files add contents in it and then do the shutil.move on it.

this I/O errors only occurs when the same file is open by two different process for write at the same time. i don't think this is proper solution creating dbs and then merging them this will endup missing things. let say, you extracted injection payloads and it is saved in original session file and the temp one you created for a time being when the original file is being used by some other process once you perform shutil.move it move contents of temp file but original file will be replaced completely. this is not a solution and not even an issue for others so i am closing this as invalid.
you can experiment this on your own. create two files add contents in it and then do the shutil.move on it.

@r0oth3x49 I can see why you might believe it's not the right solution, and most users wouldn't face this issue.
But in my specific case, I'm running some big scans, and using https://github.com/shenwei356/rush to run 10 jobs concurrently.
As you said "I/O errors only occurs when the same file is open by two different process for write at the same time". It can be possible that another scan is running on the same domain (even if the URLs are different). Because ghauri creates the session folder using the domain name, multiple processes might end up writing to the same file, which could lead to this I/O error.
The solution I proposed before might not be totally correct, but what do you think about this one:
filepath = os.path.join(user, ".ghauri")
random_string = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(8))
filepath = os.path.join(filepath, target + random_string)

I think adding random alphanumeric characters to the folder name, could let each job be distinct and may resolve the issue. I know this is still not the right fix for others, because running another scan on the same URL won't restore the previous session as it can't automatically detect the session file (due to the random strings). But for my specific use case, I'm using --flush-session --fresh-queries, so this won't really be a problem for me.


⚠ Bofrost.be has degraded performance

In 25ac762, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2246 ms

Resolved: Bofrost.be performance has improved in b9c27eb.


Configurable "Special  Character" to allow JSON fieldnames beginning with underscore "_"

Summary
The usage of the underscore character as a prefix for system fields to makes it impossible to store native JSON-Fhir Documents in CouchDb.
In FHIR  someone decided to use the "_" as a prefix for field-extensions.
 "birthDate" : "1974-12-25",
  "_birthDate" : {
    "extension" : [{
      "url" : "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
      "valueDateTime" : "1974-12-25T14:35:45-05:00"
    }]
  },

Desired Behaviour
It should be possible to store any valid JSON Object in CouchDb
Possible Solution
Configurable "Special  Character(s)" to allow JSON fieldnames beginning with underscore "_" .
So each user can decide what chars to avoid in it's datadefinitions.
Or perhaps a kind of internal masking for such keys
Additional context
It would be great to store JSON-Fhir objects natively in CouchDb because I think it could be the coolest thinkable storage engine  for it

The restriction only applies at the top-level, so if it's possible to put your FHIR object in a subobject you'll be fine.
Unfortunately it will not be possible to make this configurable for a bunch of reason, not least replication compatibility but also security aspects. The underscore prefix in couchdb is well-established and used for a variety of features.

hello robertwow ! thank you for answering immediately. in between i was out for run and ordered my thaughtsi have no control overat what level the field is set. but i see at least two nice solutions1. wrap it in a persistance-metastructure and send those candidates one level down.2. write an adapter to replace the underscore against something else for persistence and vice versa as the problem only can hapen in im / export usecaseskindly regardsmarcoAm 09.12.2023 19:24 schrieb Robert Newson @.***>:
The restriction only applies at the top-level, so if it's possible to put your FHIR object in a subobject you'll be fine.
Unfortunately it will not be possible to make this configurable for a bunch of reason, not least replication compatibility but also security aspects. The underscore prefix in couchdb is well-established and used for a variety of features.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Closing this, because a workaround was given.


Ensure terms of unicode license are being followed

we are bringing in a significant amount of unicode data and algorithms in this project. Unicode license says we're fine BUT we need to include the license statement as per the license. Ensure this is done prior to release.

no, we do not need to do anyfin further. we use the data and facts, not the actual data files. we should be clear. revisit if we pull in the actual files in the future.
worth noting that at the time that this issue was created, we WERE using data files from unicode. but that is no longer the case.


Missing backup banner

Description
There should be an additional top banner in the wallet that stays if user has not backed up wallet after new accounts have been created.
The banner should look something like the one shown below in the screenshot.

Steps to Reproduce
Expected Result
Actual Result
Versions

1.1.27
mainnet

In the Testnet app version 1.2.29 on iPhone SE (from 2016) running iOS 13.5.1, it seems that the banner does only disappears when I make a backup via either one of the first two pop-ups (after creating a new account) or the banner itself. If I make a backup via "More -> Export", the banner does not disappear.

In the Testnet app version 1.2.29 on iPhone SE (from 2016) running iOS 13.5.1, it seems that the banner does only disappears when I make a backup via either one of the first two pop-ups (after creating a new account) or the banner itself. If I make a backup via "More -> Export", the banner does not disappear.

Hey 👋🏻 Thanks for the good catch. Found and fix the bug already :)

Verified on testnet CCD app v1.2.30.


README: Add note regarding getting git from SynoCommunity

This commit adds a note to the README.md regarding the Git usage on a Synology NAS.
Since the git command isn't installed by default, git-cloning the repository like described on the deployment section results in -sh: git: command not found.
This should prevent users with lesser Synology DSM knowledge (like me) running into this issue.

Hi @dotWee, thanks for your contribution, its indeed helpful to clarify this.


Custom color theme for primary is not working properly

Since upgrading to 0.4.0 and Tailwind 2 my custom color is not visible when doing a btn btn-primary

However, it works when I hover the button:

tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        primary: {
          light: "#5bc0be", // For lighter primary color
          default: "#3a506b", // Normal primary color
          dark: "#1c2541", // Used for hover, active, etc.
        },
      },
    },
  },
  plugins: [require("kutty")]
}

I forgot to update this in the documentation, you have to change the default key to DEFAULT for it to work.
module.exports = {
  theme: {
    extend: {
      colors: {
        primary: {
          light: "#5bc0be", // For lighter primary color
          DEFAULT: "#3a506b", // Normal primary color
          dark: "#1c2541", // Used for hover, active, etc.
        },
      },
    },
  },
  plugins: [require("kutty")]
}

Sorry for the confusion!


Focus does not return to settings/parameters button on dialog closure.

Issue Description:
The focus moves to the top of the page when the settings/parameters dialog is closed. Expected behavior is that the focus returns to the settings/parameters button when the dialog is closed. APG on modal/dialog patterns which describes expected pattern - see item 2 in the Notes: "When a dialog closes, focus returns to the element that invoked the dialog ... ".
WCAG Criteria:
2.4.3: Focus Order (Level A)
Screenshot or Screen Recording:
Screen Recording
Notes:
The focus returns to the control element on the other buttons that have pop-up elements in the LLM controls. This will make the UI of the settings/parameters consistent with the rest of the controls.

Closing as this UI element is now deprecated


Resolve runtime warnings by using newly refactored functions and operations

With the refactoring work in #35, some parts of the standard and chemistry libraries now raise runtime warnings due to calling old functions and operations that have been renamed or removed. We should ensure that library code is updated to remove these warnings. Some of the work has already been started by @guanghaolow on #82.

Done.


[FLINK-29280][table-planner] fix join hints could not be propagated in subquery

What is the purpose of the change
Currently, join hint will not propagated in subquery(correlate), and this behavior is incorrect. This pr is trying to propagate it in FlinkSubQueryRemoveRule.
Brief change log

When decorrelate the subquery, attach the join hints to the new node.
Add test cases to verify this pr.

Verifying this change
Some test cases are added to verify this pr
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented?

@flinkbot run azure

The failed case is caused by https://issues.apache.org/jira/browse/FLINK-29315


[BUG] Wrong Granule naming for Sentinel 2 reprocessed products in SAFE format

Describe the bug
Some Sentinel 2 reprocessed products(baseline 00.01) have the wrong Granule name, in comparison to what is shown on the Metadata files, when dowloaded in SAFE format
To Reproduce
Steps to reproduce the behavior:

Download product S2B_MSIL2A_20181119T172619_N0001_R012_T14SPG_20200916T182702 using sentinelhub-py in SAFE format
Compare the name of the folder inside S2B_MSIL2A_20181119T172619_N0001_R012_T14SPG_20200916T182702.SAFE/GRANULE/ to what name on manisfest.safe

Expected behavior
I would expect the granule folder to be named L2A_T14SPG_A008904_20181119T172945, but it is named L2A_T14SPG_A008904_20181119T173319
Stack trace or screenshots
Granule Name:

manifest.safe:

Additional context
I know why this problem is happening and I am mostly looking for some guidance on how to fix it.
The problem is happening because of this section of the code
https://github.com/sentinel-hub/sentinelhub-py/blob/d3b74201cbb613f6866e75e19527339967b9a2e1/sentinelhub/aws_safe.py#L275-L279
Considering that we are talking about L2A products, what happens is that the reprocessed products have more than one baseline internally, 02.10 and 02.09, but it is always trying create the tile id using the sensing time when it is supposed to use the datastrip time on products like the one showed above.
My problem is that what is called tile_id_time on the code is called 'Tile Discriminator' on ESA Sentinel 2 Product Specification, but there is no explanation about how it is formed. Because of that I am having a hard time figuring out a way to recreate it.

I see that the problem is that we don't know if switching from sensing to a datastrip time, when creating tile id, is always correct for baseline 00.01. (Our process of reconstruction also doesn't look at the info from manifest to determine that.)
For now we only have examples where using datastrip time is the correct solution. Therefore I switched to datastip time in https://github.com/sentinel-hub/sentinelhub-py/pull/244. If ever a counter example appears then we'll have to make a more sophisticated logic.

Thanks for the fix @AleksMat. I think that using the datastrip time should solve the problem.
Thanks for adding test cases using products with baseline 00.01 on https://github.com/sentinel-hub/sentinelhub-py/pull/243.


add option to not use sudo (for certain embedded OSes)

Hi, I needed this change to allow me to use your crate in a robotics project. I'm using buildroot, which does not use sudo.

Thanks for the PR. Not requiring sudo was a consideration, but I did not end up implementing it for my own use case.


Fix padding issue

Looking into it, because why not. No idea if I'll succeed yet.
Resolves https://github.com/excellalabs/blog-in-a-box/issues/90, hopefully.

Ahh, I missed this gem in the docs for minimal mistakes:

Note: To make more extensive changes and customize the Sass partials bundled in the gem. You will need to copy the complete contents of the _sass directory to <your_project> due to the way Jekyll currently reads those files.

Given that, the best course of action is going to be to pull down main.scss, add a custom.scss that you reference from main, and add your updates there I think.

@nsubordin81 I figured it out.
Minimal mistakes is assuming you're operating from the root of the repository. But one trade-off we had to make for GitHub pages is that everything in blog-in-the-box is in the docs subfolder.
So, your overrides weren't overriding because the file wasn't in the right spot.
I simplified the SASS change too (I think). Let me know if you've got more questions!


Clean up codes

Summary

Remove unused import in scavenger-collector
Change from bitwise operator from boolean operator for short-circuit evaluation

Thx.


RSSI issue connecting to repeated WiFi network

Setup: router is weak, so used a repeater to boost it.
I've verified that it is actually connecting to the repeater (The BSSID addresses match), but the problem is the RSSI is -256.
Is it getting the RSSI from the original router (both sometimes pop up) while it connects to the repeater?
Tried fix-scan.zip from #15; it pops up faster, but still same issue.
MacOS 10.15.6
Intel Wireless 9560
usr-sse2/itlwm, Black80211

connect.txt

Same issue, same hardware, same OS, but not on a repeated network. I turned the wifi on and off a few times to see if it persisted, so that's what the log.txt attached reflects.
log.txt

I believe it's because this is a 2nd gen device; if we managed to patch itlwmx, then the RSSI would possibly be fixed.

Tried with an 8260, it works fine.

My guess is that itlwm::getRSSI() needs to be changed to
int itlwm::getRSSI() {
  struct ieee80211_node *bss = com.sc_ic.ic_bss;
  return bss->ni_rssi
}

ni_rssi is what is returned to HeliPort, and that is accurate. I can't get Black80211 to start though.

My guess is that itlwm::getRSSI() needs to be changed to:
int itlwm::getRSSI() {
  struct ieee80211_node *bss = com.sc_ic.ic_bss;
  return bss->ni_rssi
}

ni_rssi is what is returned to HeliPort, and that is accurate. I can't get Black80211 to start though to test.

I can confirm that this patch solves the issue on the same hardware.

ni_rssi is what is returned to HeliPort, and that is accurate. I can't get Black80211 to start though to test.

I can confirm, it works just fine using my AC-9560

same here; can we get someone with a 8560 to test to make sure nothing broke?
(i'll be able to test again within a few days)

Still works on 8265, merged to master.


fix(list): don't set buffer name

This is because the "buffer name" represents the file name of the buffer

seeing as these are just ephemeral nofile buffers they don't represent
a file on the file system.

Closes #34.

Thank you!


Repo Gathering errors out with "Forbidden": 500 Error Code.

Hello! I'm trying to selfhost awwesome, but keep running into a strange issue. The program looks like it is downloading repos from Github, but eventually errors out with Error: "Forbidden" and Error: 500. Not sure what exactly is causing it.
Running this through docker compose on Windows 11 with Docker Desktop. Compose file is directly from the Github README.
Full log below:
2023-12-15 17:50:06
2023-12-15 17:50:07 src/lib/fetch-github.ts (1:9) "GithubQueryResult" is not exported by "src/lib/types/types.ts", imported by "src/lib/fetch-github.ts".
2023-12-15 17:50:07 src/lib/fetch-github.ts (1:28) "GithubRepo" is not exported by "src/lib/types/types.ts", imported by "src/lib/fetch-github.ts".
2023-12-15 17:50:07 src/lib/fetch-github.ts (1:40) "Project" is not exported by "src/lib/types/types.ts", imported by "src/lib/fetch-github.ts".
2023-12-15 17:50:14
2023-12-15 17:50:05
2023-12-15 17:50:05 ><EMAIL_ADDRESS>build
2023-12-15 17:50:05 > vite build
2023-12-15 17:50:05
2023-12-15 17:50:06 vite v4.4.8 building SSR bundle for production...
2023-12-15 17:50:06 transforming...
2023-12-15 17:50:07 ✓ 101 modules transformed.
2023-12-15 17:50:07 rendering chunks...
2023-12-15 17:50:07 creating entries function
2023-12-15 17:50:14 vite v4.4.8 building for production...
2023-12-15 17:50:14 transforming...
2023-12-15 17:50:15 ✓ 90 modules transformed.
2023-12-15 17:50:15 rendering chunks...
2023-12-15 17:50:15 computing gzip size...
2023-12-15 17:50:15 .svelte-kit/output/client/_app/version.json                              0.03 kB │ gzip:  0.05 kB
2023-12-15 17:50:15 .svelte-kit/output/client/vite-manifest.json                             2.70 kB │ gzip:  0.49 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/assets/0.2cfb8f6d.css          11.67 kB │ gzip:  3.06 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/chunks/each.e59479a4.js         0.09 kB │ gzip:  0.10 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/chunks/stores.ff715d12.js       0.30 kB │ gzip:  0.18 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/nodes/1.396ee572.js             0.84 kB │ gzip:  0.52 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/chunks/index.08fbc02c.js        2.39 kB │ gzip:  1.24 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/chunks/singletons.dd1125c7.js   2.91 kB │ gzip:  1.49 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/entry/app.71aa22a8.js           6.01 kB │ gzip:  2.35 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/chunks/scheduler.8ad5346b.js    8.11 kB │ gzip:  3.21 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/entry/start.84793446.js        24.06 kB │ gzip:  9.56 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/nodes/0.c2d02ee5.js            26.57 kB │ gzip:  5.31 kB
2023-12-15 17:50:15 .svelte-kit/output/client/_app/immutable/nodes/2.c6479aba.js            62.13 kB │ gzip: 21.62 kB
2023-12-15 17:50:15 ✓ built in 1.03s
2023-12-15 17:50:16 creating load function, category:
2023-12-15 17:50:22 loaded 1445 projects from Awesome Selfhosted and Sysadmin in 6542.791224002838ms
2023-12-15 17:50:29 Github Repos total: 1222
2023-12-15 17:50:33 Repos: 19, Github API cost: 1, remaining: 4938
2023-12-15 17:50:37 Repos: 20, Github API cost: 1, remaining: 4937
2023-12-15 17:50:41 Repos: 19, Github API cost: 1, remaining: 4936
2023-12-15 17:50:45 Repos: 19, Github API cost: 1, remaining: 4935
2023-12-15 17:50:50 Repos: 20, Github API cost: 1, remaining: 4934
2023-12-15 17:50:54 Repos: 18, Github API cost: 1, remaining: 4933
2023-12-15 17:50:58 Repos: 19, Github API cost: 1, remaining: 4932
2023-12-15 17:51:02 Repos: 18, Github API cost: 1, remaining: 4931
2023-12-15 17:51:05 Repos: 20, Github API cost: 1, remaining: 4930
2023-12-15 17:51:10 Repos: 19, Github API cost: 1, remaining: 4929
2023-12-15 17:51:14 Repos: 18, Github API cost: 1, remaining: 4928
2023-12-15 17:51:17 Repos: 16, Github API cost: 1, remaining: 4927
2023-12-15 17:51:22 Repos: 20, Github API cost: 1, remaining: 4926
2023-12-15 17:51:26 Repos: 20, Github API cost: 1, remaining: 4925
2023-12-15 17:51:30 Repos: 20, Github API cost: 1, remaining: 4924
2023-12-15 17:51:33 Repos: 17, Github API cost: 1, remaining: 4923
2023-12-15 17:51:37 Repos: 19, Github API cost: 1, remaining: 4922
2023-12-15 17:51:41 Repos: 20, Github API cost: 1, remaining: 4921
2023-12-15 17:51:45 Repos: 16, Github API cost: 1, remaining: 4920
2023-12-15 17:51:49 Repos: 19, Github API cost: 1, remaining: 4919
2023-12-15 17:51:53 Repos: 18, Github API cost: 1, remaining: 4918
2023-12-15 17:51:56 Repos: 18, Github API cost: 1, remaining: 4917
2023-12-15 17:52:01 Repos: 20, Github API cost: 1, remaining: 4916
2023-12-15 17:52:05 Repos: 19, Github API cost: 1, remaining: 4915
2023-12-15 17:52:10 Repos: 19, Github API cost: 1, remaining: 4914
2023-12-15 17:52:13 Repos: 18, Github API cost: 1, remaining: 4913
2023-12-15 17:52:17 Repos: 19, Github API cost: 1, remaining: 4912
2023-12-15 17:52:21 Repos: 18, Github API cost: 1, remaining: 4911
2023-12-15 17:52:26 Repos: 20, Github API cost: 1, remaining: 4910
2023-12-15 17:52:29 Repos: 19, Github API cost: 1, remaining: 4909
2023-12-15 17:52:34 Repos: 20, Github API cost: 1, remaining: 4908
2023-12-15 17:52:38 Repos: 18, Github API cost: 1, remaining: 4907
2023-12-15 17:52:44 Repos: 20, Github API cost: 1, remaining: 4906
2023-12-15 17:52:48 Repos: 17, Github API cost: 1, remaining: 4905
2023-12-15 17:52:52 Repos: 20, Github API cost: 1, remaining: 4904
2023-12-15 17:52:56 Repos: 19, Github API cost: 1, remaining: 4903
2023-12-15 17:53:00 Repos: 19, Github API cost: 1, remaining: 4902
2023-12-15 17:53:05 Repos: 19, Github API cost: 1, remaining: 4901
2023-12-15 17:53:09 Repos: 20, Github API cost: 1, remaining: 4900
2023-12-15 17:53:13 Repos: 20, Github API cost: 1, remaining: 4899
2023-12-15 17:53:17 Repos: 20, Github API cost: 1, remaining: 4898
2023-12-15 17:53:22 Repos: 20, Github API cost: 1, remaining: 4897
2023-12-15 17:53:26 Repos: 20, Github API cost: 1, remaining: 4896
2023-12-15 17:53:29 Repos: 17, Github API cost: 1, remaining: 4895
2023-12-15 17:53:33 Repos: 20, Github API cost: 1, remaining: 4894
2023-12-15 17:53:33 Error: "Forbidden"
2023-12-15 17:53:33     at fetchRepoInfoFromGithub (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:258:11)
2023-12-15 17:53:33     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-12-15 17:53:33     at async fetchAllGithubRepositories (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:218:20)
2023-12-15 17:53:33     at async load (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:330:12)
2023-12-15 17:53:33     at async load_server_data (file:///usr/src/app/.svelte-kit/output/server/index.js:646:18)
2023-12-15 17:53:33     at async file:///usr/src/app/.svelte-kit/output/server/index.js:2009:18
2023-12-15 17:53:33 Error: "Forbidden"
2023-12-15 17:53:33     at fetchRepoInfoFromGithub (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:258:11)
2023-12-15 17:53:33     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-12-15 17:53:33     at async fetchAllGithubRepositories (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:218:20)
2023-12-15 17:53:33     at async load (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:330:12)
2023-12-15 17:53:33     at async load_server_data (file:///usr/src/app/.svelte-kit/output/server/index.js:646:18)
2023-12-15 17:53:33     at async file:///usr/src/app/.svelte-kit/output/server/index.js:2009:18
2023-12-15 17:53:33 creating load function, category:  analytics
2023-12-15 17:53:33
2023-12-15 17:53:33 node:internal/event_target:1088
2023-12-15 17:53:33   process.nextTick(() => { throw err; });
2023-12-15 17:53:33                            ^
2023-12-15 17:53:33 Error: 500 /
2023-12-15 17:53:33 To suppress or handle this error, implement `handleHttpError` in https://kit.svelte.dev/docs/configuration#prerender
2023-12-15 17:53:33     at file:///usr/src/app/node_modules/@sveltejs/kit/src/core/config/options.js:212:13
2023-12-15 17:53:33     at file:///usr/src/app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:64:25
2023-12-15 17:53:33     at save (file:///usr/src/app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:403:4)
2023-12-15 17:53:33     at visit (file:///usr/src/app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:236:3)
2023-12-15 17:53:33 Emitted 'error' event on Worker instance at:
2023-12-15 17:53:33     at [kOnErrorMessage] (node:internal/worker:326:10)
2023-12-15 17:53:33     at [kOnMessage] (node:internal/worker:337:37)
2023-12-15 17:53:33     at MessagePort.<anonymous> (node:internal/worker:232:57)
2023-12-15 17:53:33     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
2023-12-15 17:53:33     at exports.emitMessage (node:internal/per_context/messageport:23:28)
2023-12-15 17:53:33
2023-12-15 17:53:33 Node.js v20.10.0
2023-12-15 17:53:33 npm notice
2023-12-15 17:53:33 npm notice New patch version of npm available! 10.2.3 -> 10.2.5
2023-12-15 17:53:33 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
2023-12-15 17:53:33 npm notice Run `npm install -g<EMAIL_ADDRESS>to update!
2023-12-15 17:53:33 npm notice

I had this issue a while back and thought I fixed it in https://github.com/mkitzmann/awwesome/commit/965436583d1fe9dcea6857e976463fd66cb9e5ad
What I think is happening is that there are too many requests in a short time so Github rate limit is kicking in.
Initially I used Promise.all to speed up the build process, but then I went back to sequentially handling the request so this does not happen. Maybe your machine is too fast and thus there are still too many requests.

Interesting. As a test, I rate-limited my computer to 100 Mbps, and the same issue occurred.

Just to be sure, did you create a fine-grained personal access token as described here https://github.com/mkitzmann/awwesome#personal-access-token ?

Yep, I used a fine-grained personal access token.

I'm seeing the same error here. I am using a fine-grained PAT as well.
Partial log:
awwesome  | Github Repos total: 1215
awwesome  | Repos: 19, Github API cost: 1, remaining: 4815
awwesome  | Repos: 20, Github API cost: 1, remaining: 4814
awwesome  | Repos: 19, Github API cost: 1, remaining: 4813
awwesome  | Repos: 19, Github API cost: 1, remaining: 4812
awwesome  | Repos: 20, Github API cost: 1, remaining: 4811
awwesome  | Repos: 18, Github API cost: 1, remaining: 4810
awwesome  | Repos: 19, Github API cost: 1, remaining: 4809
awwesome  | Repos: 18, Github API cost: 1, remaining: 4808
awwesome  | Repos: 20, Github API cost: 1, remaining: 4807
awwesome  | Repos: 19, Github API cost: 1, remaining: 4806
awwesome  | Repos: 15, Github API cost: 1, remaining: 4805
awwesome  | Repos: 19, Github API cost: 1, remaining: 4804
awwesome  | Repos: 20, Github API cost: 1, remaining: 4803
awwesome  | Repos: 20, Github API cost: 1, remaining: 4802
awwesome  | Repos: 19, Github API cost: 1, remaining: 4801
awwesome  | Error: "Forbidden"
awwesome  |     at fetchRepoInfoFromGithub (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:258:11)
awwesome  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
awwesome  |     at async fetchAllGithubRepositories (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:218:20)
awwesome  |     at async load (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:330:12)
awwesome  |     at async load_server_data (file:///usr/src/app/.svelte-kit/output/server/index.js:646:18)
awwesome  |     at async file:///usr/src/app/.svelte-kit/output/server/index.js:2009:18
awwesome  | Error: "Forbidden"
awwesome  |     at fetchRepoInfoFromGithub (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:258:11)
awwesome  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
awwesome  |     at async fetchAllGithubRepositories (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:218:20)
awwesome  |     at async load (file:///usr/src/app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:330:12)
awwesome  |     at async load_server_data (file:///usr/src/app/.svelte-kit/output/server/index.js:646:18)
awwesome  |     at async file:///usr/src/app/.svelte-kit/output/server/index.js:2009:18
awwesome  | creating load function, category:  analytics
awwesome  |
awwesome  | node:internal/event_target:1088
awwesome  |   process.nextTick(() => { throw err; });
awwesome  |                            ^
awwesome  | Error: 500 /
awwesome  | To suppress or handle this error, implement `handleHttpError` in https://kit.svelte.dev/docs/configuration#prerender
awwesome  |     at file:///usr/src/app/node_modules/@sveltejs/kit/src/core/config/options.js:212:13
awwesome  |     at file:///usr/src/app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:64:25
awwesome  |     at save (file:///usr/src/app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:403:4)
awwesome  |     at visit (file:///usr/src/app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:236:3)
awwesome  | Emitted 'error' event on Worker instance at:
awwesome  |     at [kOnErrorMessage] (node:internal/worker:326:10)
awwesome  |     at [kOnMessage] (node:internal/worker:337:37)
awwesome  |     at MessagePort.<anonymous> (node:internal/worker:232:57)
awwesome  |     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
awwesome  |     at exports.emitMessage (node:internal/per_context/messageport:23:28)
awwesome  |
awwesome  | Node.js v20.10.0
awwesome  | npm notice
awwesome  | npm notice New patch version of npm available! 10.2.3 -> 10.2.5
awwesome  | npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
awwesome  | npm notice Run `npm install -g<EMAIL_ADDRESS>to update!
awwesome  | npm notice
awwesome exited with code 1

I have added a requestDelay setting in config.ts which will delay each request to GitHub for the given ms.
Please try setting it to a high value like 1000 and let me know if this fixes the issue.

requestDelay

Can you expose this as a docker environment variable? I cannot find that file in the filesystem on docker desktop on Windows, and the docker container itself doesn't have a text editor installed for me to edit that specific property.

The request delay worked well! I can now see the webpage and projects!
I'll let you mark as closed in case there is any other discussion that is needed.

Glad it works now!
I created a new issue to expose the config as environment variables.
I will close this issue. If anyone still runs into this, feel free to reopen.

You could try increasing the request delay even more, but that is just a wild guess.

You should be able to add it as an environment variable like:
 environment:
      REQUEST_DELAY: 4000


Add kOS v0.19.0

@hvacengi updated the zip file in the release but our bot keeps failing because of the previous zipfile had an error, so adding this manually.

Thanks for taking care of this for us!

Tests fine. Merging with my thanks


Add subcommand to cleanup images?

Checklist

[X] I've looked through the issues and pull requests for similar request
[ ] This feature could be solved with a custom docker image (optional)

Describe your request
Currently, users have to be proficient with docker or podman to cleanup images, when we should be able to remove any installed images if desired from a cross subcommand.
For example:
cross remove-images

This would then filter for all images starting with ghcr.io/cross-rs, and rustembedded/cross, and then remove all the matching images. We could also accept a list of targets, or empty for all, to remove all matching targets. For the former, we would want to filter for those matching main or edge, to avoid removing local images.
For example:
cross remove-images aarch64-unknown-linux-gnu arm-unknown-linux-gnueabi mips-unknown-linux-gnu

We could probably at the same time provide a list-images subcommand, to list what images have been previously installed, using the same syntax.
$ cross list-images
aarch64-unknown-linux-gnu
arm-unknown-linux-gnueabi
mips-unknown-linux-gnu

Describe why this would be a good inclusion for cross
This would further simplify using cross as a "zero-setup" cross-compilation tool, and also avoid users having to manually cleanup numerous images or write a script to automatically remove all images to reduce the storage requirements of cross.

I think to avoid clashes with cargo (not likely), this should be a cross-dev tool, I've been thinking about something for that with gated features to also replace the bash scripts (that are used in CI)

That sounds good, so that would also work for the target info and build-docker-image.sh or so? I think probably cross-dev maybe should just be for maintainers though, and we should have another tool for client utilities/extensions (like what's mentioned here)?

That sounds fair.
We can bundle the extra tool with a  [[bin]] target. Maybe cross-util?

I think that sounds perfect. I'll start migrating things over after I finish the workspaces stuff, which I think has higher priority.