Explore all Notification open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in Notification

server

Version 2.1.3

fsnotify

Revert Add AddRaw to not follow symlinks

gorush

apprise

Apprise Release v0.9.8.1

noti

3.5.0

Popular Libraries in Notification

push.js

by Nickersoft doticonjavascriptdoticon

star image 8560 doticonMIT

The world's most versatile desktop notifications framework :earth_americas:

server

by gotify doticongodoticon

star image 6935 doticonNOASSERTION

A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)

fsnotify

by fsnotify doticongodoticon

star image 6784 doticonBSD-3-Clause

Cross-platform file system notifications for Go.

noty

by needim doticonjavascriptdoticon

star image 6753 doticonMIT

⛔️ DEPRECATED - Dependency-free notification library that makes it easy to create alert - success - error - warning - information - confirmation messages as an alternative the standard alert dialog.

gorush

by appleboy doticongodoticon

star image 6246 doticonMIT

A push notification server written in Go (Golang).

apprise

by caronc doticonpythondoticon

star image 4978 doticonMIT

Apprise - Push Notifications that work with just about every platform!

alertify.js

by fabien-d doticonjavascriptdoticon

star image 4321 doticon

JavaScript Alert/Notification System

node-apn

by node-apn doticonjavascriptdoticon

star image 4214 doticonMIT

:calling: Apple Push Notification module for Node.js

octobox

by octobox doticonrubydoticon

star image 4181 doticonAGPL-3.0

📮Untangle your GitHub Notifications

Trending New libraries in Notification

notify

by nikoksr doticongodoticon

star image 1024 doticonMIT

A dead simple Go library for sending notifications to various messaging services.

multi

by kofigumbs doticonswiftdoticon

star image 782 doticonGPL-3.0

Create a custom, lightweight macOS app from a group of websites

chanify

by chanify doticongodoticon

star image 777 doticonMIT

Chanify is a safe and simple notification tools. This repository is command line tools for Chanify.

hot-toast

by ngneat doticontypescriptdoticon

star image 493 doticonMIT

🍞 Smoking hot Notifications for Angular. Lightweight, customizable and beautiful by default.

tiramisu

by Sweets doticoncdoticon

star image 449 doticonMIT

Desktop notifications, the UNIX way

Poes

by AvdLee doticonswiftdoticon

star image 387 doticonMIT

A Swift command-line tool to easily send push notifications to the iOS simulator

herbe

by dudik doticoncdoticon

star image 301 doticonMIT

Daemon-less notifications without D-Bus. Minimal and lightweight.

notify

by guanguans doticonphpdoticon

star image 301 doticonMIT

推送通知 sdk(Bark、Chanify、钉钉群机器人、Discord、邮件、飞书群机器人、Gitter、Google Chat、iGot、Logger、Mattermost、Now Push、PushBack、Push、PushDeer、PushPlus、QQ 频道机器人、Rocket Chat、Server 酱、Showdoc Push、Slack、Telegram、Webhook、企业微信群机器人、息知、Zulip)。

tall-toasts

by usernotnull doticonphpdoticon

star image 257 doticonMIT

A Toast notification library for the Laravel TALL stack. You can push notifications from the backend or frontend to render customizable toasts with almost zero footprint on the published CSS/JS 🔥🚀

Top Authors in Notification

1

laravel-notification-channels

25 Libraries

star icon1942

2

php-flasher

24 Libraries

star icon232

3

OneSignal

13 Libraries

star icon2626

4

GetStream

12 Libraries

star icon1570

5

sensu-plugins

10 Libraries

star icon116

6

nextcloud

9 Libraries

star icon203

7

pusher

9 Libraries

star icon170

8

neoighodaro

6 Libraries

star icon121

9

realtime-framework

6 Libraries

star icon141

10

Astrotomic

6 Libraries

star icon17

2

24 Libraries

star icon232

3

13 Libraries

star icon2626

4

12 Libraries

star icon1570

5

10 Libraries

star icon116

6

9 Libraries

star icon203

7

9 Libraries

star icon170

8

6 Libraries

star icon121

9

6 Libraries

star icon141

10

6 Libraries

star icon17

Trending Kits in Notification

Two-factor authentication (2FA) is a multifactor security process where users must authenticate their identity with two different means. This ensures better protection of secured assets and information.

Traditional username and password combinations are prone to hacking and getting hacked has been on the rise. Implementing 2FA authentication will prevent hackers from accessing your accounts even if your password is stolen. 2FA is a recommended practice for securing all your online accounts and devices to protect sensitive information losses.

You will need a different set of components with features ranging from creating the secret codes, accessing and authenticating.

OTP:

Time-based One-Time Password involves generating a one-time password from a shared secret key and the current timestamp using cryptographic algorithms. These libraries will help you generate secrete one-time passwords

SMS

Typically the OTP codes are sent to the user's mobile phone using SMS. This also helps to validate the user's mobile number correctness. The user can then enter the secret code into the application to complete the multifactor authentication. The below libraries will help in sending SMS from your application.

Email

The unique generated one-time password is sent via email to the user. The user uses the code from the email and enters the code into the application to confirm the authentication.

Biometric Authentication

Using Biometrics for authentication has been made easy with mobile devices. Biometrics can include different choices, such as using fingerprints, voice, and face as the secondary authentication mechanism.

Push Notifications

Typically, push notifications are sent to your mobile app to authorize login requests. It will include the details of the access device details and once authorized, the login to the application is allowed. Below libraries help in implementing the push notification-based authorization.

Here are some famous Vue Notification Libraries. Some of the Vue Notification Libraries' use cases include User Registration Confirmation, Error Messages, System Status Updates, In-App Notifications, and Task Reminders.


Vue notification libraries are libraries that allow developers to easily integrate notifications into their applications built with the Vue framework. They provide various features such as displaying notifications, customizing the look and feel of the notification, and animating the notifications.


Let us look at these libraries in detail below.

vue-notification

  • Provides a wide range of styling and customization options.
  • Only 6kb minified and gzipped, making it an ideal choice for applications with limited resources.
  • Makes it easy to integrate with existing Vue projects and can be used with a single line of code.

vue-toasted

  • Allows you to create multiple notification queues.
  • Allows developers to customize, extend, and create their own notifications.
  • Integrates with other popular Vue libraries such as Vuex, Vue Router, and Vue i18n.

vue-notifications

  • Built-in animations to make notifications look more dynamic and engaging.
  • Supports both native and custom styles, allowing users to customize the look and feel of their notifications. 
  • Supports multiple types of notifications, including alerts, success messages, and error messages.

vue-toast-notification

  • Can place toast notifications in any position you want.
  • Come with a range of animation effects that you can use to make them even more attractive.
  • Notifications can be dismissed with a simple click, making them easier and faster to close.

vue-notifikation

  • Lightweight and straightforward API that makes it easy to set up and use.
  • Wide range of configurable options that allow users to customize their notifications to meet their specific needs.
  • Makes use of animated transitions to draw the user's attention to important messages.

vue-notification-center

  • Allows users to easily add multiple notifications to the same page.
  • Supports multiple languages, making it ideal for multi-lingual applications.
  • Used to create custom notifications with various components and animations.

vue-notify

  • Allows for custom styling with the use of HTML and CSS.
  • Notifications are non-blocking, meaning they won’t block user interaction with other elements on the page.
  • Offers a wide range of configuration options including color, position, animation type and more.

vue-notification-manager

  • Supports traditional toast-style notifications.
  • Allows developers to easily add support for multiple languages.
  • Popover notifications for when more detail is needed.

React notification libraries allow developers to add notifications to React applications. Notifications can inform users of events, such as when a task is complete, or an error has occurred. Notification libraries provide various customization options. It includes styling and custom logic for when we display notifications.  

Different types of react available notification libraries:  

Simple React Notifications (SRN):  

SRN is a simple library for adding notifications to React applications. SRN supports alert, info, success, and error styling. It provides a callback when we dismiss a notification.  

React-Notification-System:  

This library is a more comprehensive solution for adding notifications to React applications. It allows complex logic to determine when we display the notifications. It allows for custom styling notifications and adding buttons (with callbacks).  

React-Toastify:  

React Toastify is a simple notification library for React apps. It features custom styling and several built-in animations for displaying notifications.  

React Notiflix:  

React Notiflix is a comprehensive library for adding notifications to React applications. It includes various options for customizing and styling notifications. It will support many different types of notifications.  

React Notification Redux:  

React Notification Redux is another comprehensive library for adding notifications to React applications. It includes many different features for customizing and styling the notifications. It includes support for many types of notifications.  

 

Toastify Package is a non-blocking notifications component for React apps. It provides a complete and customizable toast notification system for React applications. With Toastify, users can pause toasts and adjust the order of toasts using the toastId. Toastify offers other features like custom icons and progress bar/loading indicators. Thus, Toastify is for anyone looking for a scalable server's state management library for their app development. This library offers users a Spec compliant notification for user devices. To install Toastify, use the following command in your terminal: npm install react-toastify.  

 

Firebase Cloud Messaging is a cross-platform messaging solution. It provides rich support for developing and delivering secure notifications to users' devices. It is suitable for the web, Android, iOS, and others.  

Different features that are available in react notification libraries: 

  • Alerts:  

These simple notifications usually pop up with a message, action button, or link.  

  • Messages:  

Messages provide detailed notifications. It usually appears near the bottom of a page or window and includes a message and a link or action button.  

  • Tooltips:  

Tooltips are mini notifications that usually appear when a user hovers over an element. They usually provide a brief explanation.  

  • Popup Windows:  

Popup windows provide more comprehensive notifications that can alert or inform a user. These often prompt a user for extra information or a specific action.  

  • Pages:  

Pages are notifications that cover an entire page of the application. They usually provide more detailed information about a notification or action.  

  • System Tray:  

System tray notifications are comprehensive notifications. It can inform or remind users of an action.  

  • Sticky Notifications:  

Sticky notifications are notifications we display until the user dismisses them. They can provide useful reminders.  

  • React Native Notifications:  

React Native Notifications provide platform-specific notifications for both the application and the browser.  

 

React notification libraries are from simple alerts informing change users to complex notifications. We can inform users of new or changed web services and APIs. We can use APIs to identify API executions and validate data updates.  

 

Simple alert notifications can allow users to take immediate action. They can help alert users to system events or errors and inform users of changes to web content. It provides feedback on user interactions.  

 

More sophisticated notifications help notify users of web services and APIs. These notifications can improve user experience and protect against potential security threats. It helps track API executions, receive real-time system events, and validate data updates. It helps track API usage for analytics.  

 

Notifications can generate detailed reports of user interactions and data updates. It can improve system performance and user experience. This detailed reporting can provide insights into the usability of applications and APIs. It allows developers to identify areas for improvement and optimize user experiences.  

Tips for setting up and using a react notification library: 

1. Make sure you have the necessary libraries installed.  

2. If you use a create-react-app for setting up your project, you can install the libraries using npm:  

 ```npm install react-notifications-component```  

3. Integrate your library into your React project.  

4. You can then use the library to create notifications with your message and styling. The react-notifications component has several helpful methods for creating notifications. You can create success, info, warning, and error.  

Pointers on how to best use React notification libraries in your applications: 

1. Understand how your users enjoy notifications 

Ensure you have a firm grasp of the needs of your users, which will inform how we should use notifications.  

2. Decide on the type of notifications 

React notification libraries offer both simple alerts and full-fledged notification hubs.  

3. Define user options 

Consider allowing users the choice of which notifications they receive. This can involve prompt alerts for notifications and a hub for important tidbits.  

4. Utilise persistent notifications 

Consider utilizing persistent notifications to bring attention back to a certain area. It happens if the user needs to respond or interact with a notification.  

5. Use customized notifications  

Differentiate various notifications with customized color, text size, and sound features.  

6. Make notifications actionable 

Don't make a notification a passive element on the screen. Allow users to act further on notifications, such as marking them as read or opening a URL.  

7. Incorporate testing  

Using any library involves testing it within your project. Use unit tests to ensure your notifications every time you change your codebase.  

When writing about these Libraries, it is important to cover the following key points:  

  • Different types of libraries available:  

Different React Notifications Libraries provide components that we can use for notifications.  

  • Integrations with external services:  

We can integrate React Notifications Libraries with external services for sending real-time notifications.  

  • Examples of implementation:  

It is important to provide examples and practical implementations. It helps readers to understand how to use them.  

  • Using and customizing components:  

It provides tutorials for using and customizing components from React Notification Libraries.  

  • Information on sound and visual elements:  

It provides information on enabling sound and visual elements for libraries.  

 

Snackbar notification messages are short messages that alert or provide information to users. They appear at the bottom part of the device screen and can contain a brief message, an action, or both. They are used for new releases and changes to settings, user account updates, or errors.  

 

React has libraries for snackbar notifications, like Toastify, Notifications, and React-Equity Notification. These libraries allow users to build icons, progress bars, indicators, and close buttons. Many JavaScript libraries can be integrated with React applications.  

 

Popup boxes are a common feature found in most react notification libraries. The popup box can contain a close button, a progress bar, loading indicators, and custom icons.  

 

React notification libraries provide developers with a straightforward and versatile solution. It helps in alerting users of the app or website changes. Developers can create notifications with custom positioning, animations, and sound effects with code. Notifications can be triggered, AJAX requests, or from the component's state.  

 

Using React notification libraries can help developers create dynamic user experiences. They should do so without wasting time writing boilerplate code. Notification libraries can be customized and enhanced with extra features. It provides developers with plenty of flexibility when crafting their applications.  

 

Let's look at each library in detail. The links allow you to access package commands, installation notes, and code snippets.  

sweetalert2  

  • It offers a wide range of customization options according to your needs.  
  • It has a range of animated transitions, making it appealing and fun to use.  
  • Provides support for many inputs, allowing users to include various information.  

react-toastify  

  • Offers four different positions for toast notifications.  
  • Developers can use a progress bar to represent the progress of a task.  
  • Suspends the toast notifications for mobile viewports. So they don't obstruct the user's view.  

react-native-push-notifications  

  • It is lightweight and has no setup or maintenance time required.  
  • Supports cloud message delivery. It makes ensuring your messages reach their intended destinations even easier.  
  • Offers robust targeting capabilities.  

notie  

  • It has no external dependencies, making it lightweight and easy to use.  
  • It is built with native UI elements. It supports enhanced user experience in mobile and touch interaction devices.  
  • Provides easy customization of color, animation speed, labels, dismiss delay, and more.  

react-toast-notifications  

  • It is device responsive.  
  • It adopts a modular approach, making it extendable and customizable.  
  • It uses React Hooks, giving developers more flexibility when dealing with toast notifications.  

react-notifications-component  

  • It can be integrated into any React app with minimal effort.  
  • Users can receive real-time notifications when an event is triggered in the app.  
  • It can be completely customized and styled to match the look and feel of an existing app.  

react-s-alert  

  • Supports different types of alerts such as success, warning, and error.  
  • Features a very straightforward setup process.  
  • It alerts as per the device's width.  

FAQ 

What is the react-toastify library, and how does it work?  

React-Toastify library provides customizable notification messages (or "toasts") to web applications. Toasts can display success and error messages without taking up screen real estate. It works by providing a component for rendering toast. It helps in letting you display them with a single function call. You can customize toast properties such as position, timing, and styling. It allows them to fit into your web application.  

 

How can I use this library to create non-blocking notifications within an application?  

The library provides a React component to create non-blocking notifications. First, install the library using yarn or NPM within a React application. Next, import the Notification component into a React file. After that, create the non-blocking notifications within the render function. Include the props for creating the notifications, like 'message', 'type', 'title', and 'onClose'. Finally, add the component to the application and pass the props. This will enable the application to make non-blocking notifications.  

 

What features does Scalable Server State Management Library offer for toast notification messages?  

The Scalable Server State Management Library has the features for toast notification messages:  

  • Push notifications – The library lets us push timely client updates. It informs the user in real-time.  
  • Persistent notifications – Toast notifications can be recurrent. They don't disappear after a user action, reminding users of their activities.  
  • Customizable display – Toast notifications are customizable text, image, and color. We can tailor it to any brand or language.  
  • Targeting – Toast notifications can reach specific audiences or segments. It allows users to receive relevant messages.  
  • Segmentation – Toast notifications can separate segments of users. It helps send it to different user groups that can receive tailored messages.  
  • Analytics – The library allows for the collection and analysis of user data. It helps understand user behavior and determine where notifications are most effective.  
  •  

Is there a comprehensive guide on how to use Cloud Messaging with a React app?  

Yes, a comprehensive guide is available online. It was created by the React team on how to use Cloud Messaging with a React app.  

 

How would an experienced user rate the notification library available in the market?  

Notifications are becoming a more important part of the application experience. The experienced user would rate the current notification libraries available in the market. Current libraries generally offer a good selection of features. Those are designed to make notification management and customization very convenient. Many popular libraries are well-tested so users can get up and running.  

 

What are the best practices and tips for creating snackbar notification messages?  

  • First, identify the type of action. It needs to be conveyed by the notification and determine the appropriate text and style to go with it. Aim for short messages with clear language. Also, avoid using jargon or technical terminology.  
  • Ensure the message is written and contains a call to action.  
  • Use a consistent location for the snackbar to appear. It ensures that it doesn't interfere with the layout or flow of the app.  
  • Make sure the snackbar is visible and within reach of the user.  
  • If complete success isn't guaranteed, use phrases like "Entity updated " or "Task completed".  
  • Set a reasonable timeout so that the message will be visible for an adequate time.  
  • Place a close icon or an appropriate action next to the message for the user to dismiss it. They offer appropriate feedback for possible errors or failures.  
  • If snackbars appear, consider collapsing rules where we can combine many snackbars.  
  • Use snackbars to inform users of updates, changes, or other pertinent information. Aim to provide a consistent and pleasant experience when using snackbars.  
  • Test out the notifications with alternative user scenarios. It helps ensure that the user experience is not disadvantaged.  
  •  

Can Cloud Messaging send notifications from one system to another in an application?  

Yes, cloud messaging can send notifications from one system to another in the application. FCM is a free and reliable service hosted by Google. It enables developers to send messages and notifications.  

 

Are there any alternatives or competitors of the react-toastify library? Will they provide similar functionality and benefits to this library?  

Other alternatives for react-toastify include Toastr, Redux toastr, Sweetalert2, and React Notifications. Each library provides its unique advantages, so it is up to you to decide which one best suits your needs.  

 

Can I create customizable components using the react-toastify library for my React app?  

Yes, creating completely customizable components using the react-toastify library is possible. The library allows great customization when creating components. It includes customizing the toast position, adding animations, and customizing styling options.  

 

How does react-toastify compare with other popular notification libraries available today?  

React-Toastify is among the popular notification libraries available. It has become popular due to its ease of use. It offers various features to customize notifications with minimal code. React-toastify can be used with big data sets due to its use of virtual DOM to keep track of its components. Performance has been benchmarked at higher speeds than some of its competitors. React-Toastify also has built-in accessibility features, which follow many accessibility standards. In general, React-Toastify is an ideal library for creating notifications. It offers a great alternative to some of the other popular options available today. 

Here are the best python notification libraries. These libraries are useful for sending notifications to users and letting them know how their function is progressing.   


Notifications are necessary to inform the user of updates or other important bits of information. It is a small text message which will appear on the desktop or mobile screen. People who receive notifications find it easier to remember things. The user can concentrate on momentous events while ignoring less important ones with the help of notifications. After finishing the task, we can refer to the notifications saved in the notification bar. Simple libraries or modules developed using python help create and push notifications in any platform like e-mail, websites, etc.  


Below is an appropriately tailored list of the top python notification libraries, focusing on helping developers with any task involving notifications. 

Knockknock -  

  • Used in deep training models. 
  • Used to notify when training is complete. 
  • Also used to notify when training crashes. 
  • Can set up notifications in email, slack, telegram, etc.

notify-py -  

  • Send cross-platform desktop notifications. 
  • Can send notifications with icons, sounds, titles, and no-block functionality.  
  • Does not require any external dependencies. 

notifiers - 

  • An effortless way to send notifications. 
  • Simple and unified interface for all notification providers. 
  • Built out of stable and well-known dependencies. 

apprise -  

  • A typical and simple notification syntax. 
  • Let you transfer the notification to all universally used notification services. 
  • All messages are sent asynchronously. 
  • Image and attachment handling is supported. 

Stream-Framework -  

  • Python library, which uses Cassandra or Redis.  
  • Apart from notification systems, they are used to build news feeds and activity streams. 
  • Cloud based feed technology. 

django-push-notifications - 

  • Django based library to send push notifications. 
  • Via GCM or APNS. 
  • Supports single as well as bulk notifications. 

django-notifications - 

  • Used for building GitHub notifications.  
  • Derived from Django-activity-stream. 
  • Arbitrary data can be attached to the notifications. 

PyAPNs - 

  • Exclusive for interacting with apple push notifications. 
  • It helps with reducing unnecessary message overhead. 
  • Can also send complicated alerts with custom buttons and payload arguments.

Windows-10-Toast-Notifications -  

  • Exclusive for displaying Windows 10 Toast Notifications. 
  • Useful in Windows GUI development. 
  • Easy to use and deploy. 

Trending Discussions on Notification

Why do Switch and ListView controls in MAUI not update with 2-way binding?

The unauthenticated git protocol on port 9418 is no longer supported

Attempting to register a user on my devise app causes undefined method `user_url' for #<Devise::RegistrationsController:0x0000000000d9d0>

How to install the Bumblebee 2021.1.1 Android Studio Patch?

What is the correct way to install Android Studio Bumblebee 2021.1.1 Patch 1

Error: Requiring module "node_modules\react-native-reanimated\src\Animated.js",

flutter permission Handler grant not showing on iOS

Vue 3: Module '"../../node_modules/vue/dist/vue"' has no exported member

clarity.js by Microsoft slowing overall page loads

expo-barcode-scanner only works once with react-native version 0.64.2 and expo 43.0.0

QUESTION

Why do Switch and ListView controls in MAUI not update with 2-way binding?

Asked 2022-Apr-11 at 09:33

This question is about two MAUI controls (Switch and ListView) - I'm asking about them both in the same question as I'm expecting the root cause of the problem to be the same for both controls. It's entirely possible that they're different problems that just share some common symptoms though. (CollectionView has similar issues, but other confounding factors that make it trickier to demonstrate.)

I'm using 2-way data binding in my MAUI app: changes to the data can either come directly from the user, or from a background polling task that checks whether the canonical data has been changed elsewhere. The problem I'm facing is that changes to the view model are not visually propagated to the Switch.IsToggled and ListView.SelectedItem properties, even though the controls do raise events showing that they've "noticed" the property changes. Other controls (e.g. Label and Checkbox) are visually updated, indicating that the view model notification is working fine and the UI itself is generally healthy.

Build environment: Visual Studio 2022 17.2.0 preview 2.1
App environment: Android, either emulator "Pixel 5 - API 30" or a real Pixel 6

The sample code is all below, but the fundamental question is whether this a bug somewhere in my code (do I need to "tell" the controls to update themselves for some reason?) or possibly a bug in MAUI (in which case I should presumably report it)?

Sample code

The sample code below can be added directly a "File new project" MAUI app (with a name of "MauiPlayground" to use the same namespaces), or it's all available from my demo code repo. Each example is independent of the other - you can try just one. (Then update App.cs to set MainPage to the right example.)

Both examples have a very simple situation: a control with two-way binding to a view-model, and a button that updates the view-model property (to simulate "the data has been modified elsewhere" in the real app). In both cases, the control remains unchanged visually.

Note that I've specified {Binding ..., Mode=TwoWay} in both cases, even though that's the default for those properties, just to be super-clear that that isn't the problem.

The ViewModelBase code is shared by both examples, and is simply a convenient way of raising INotifyPropertyChanged.PropertyChanged without any extra dependencies:

ViewModelBase.cs:

1using System.ComponentModel;
2using System.Runtime.CompilerServices;
3
4namespace MauiPlayground;
5
6public class ViewModelBase : INotifyPropertyChanged
7{
8    public event PropertyChangedEventHandler PropertyChanged;
9
10    public bool SetProperty<T>(ref T field, T value, [CallerMemberName] string name = null)
11    {
12        if (EqualityComparer<T>.Default.Equals(field, value))
13        {
14            return false;
15        }
16        field = value;
17        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
18        return true;
19    }
20}
21
Switch sample code

SwitchDemo.xaml

1using System.ComponentModel;
2using System.Runtime.CompilerServices;
3
4namespace MauiPlayground;
5
6public class ViewModelBase : INotifyPropertyChanged
7{
8    public event PropertyChangedEventHandler PropertyChanged;
9
10    public bool SetProperty<T>(ref T field, T value, [CallerMemberName] string name = null)
11    {
12        if (EqualityComparer<T>.Default.Equals(field, value))
13        {
14            return false;
15        }
16        field = value;
17        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
18        return true;
19    }
20}
21<?xml version="1.0" encoding="utf-8" ?>
22<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
23             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
24             x:Class="MauiPlayground.SwitchDemo">
25    <StackLayout>
26        <Label Text="Switch binding demo" />
27        <HorizontalStackLayout>
28            <Switch x:Name="switchControl"
29                    IsToggled="{Binding Toggled, Mode=TwoWay}"
30                    Toggled="Toggled" />
31            <CheckBox IsChecked="{Binding Toggled, Mode=TwoWay}" />
32            <Label Text="{Binding Toggled}" />
33        </HorizontalStackLayout>
34
35        <Button Text="Toggle" Clicked="Toggle" />
36        <Label x:Name="manualLabel1" Text="Value set in button click handler" />
37        <Label x:Name="manualLabel2" Text="Value set in toggled handler" />
38    </StackLayout>
39</ContentPage>
40

SwitchDemo.cs

1using System.ComponentModel;
2using System.Runtime.CompilerServices;
3
4namespace MauiPlayground;
5
6public class ViewModelBase : INotifyPropertyChanged
7{
8    public event PropertyChangedEventHandler PropertyChanged;
9
10    public bool SetProperty<T>(ref T field, T value, [CallerMemberName] string name = null)
11    {
12        if (EqualityComparer<T>.Default.Equals(field, value))
13        {
14            return false;
15        }
16        field = value;
17        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
18        return true;
19    }
20}
21<?xml version="1.0" encoding="utf-8" ?>
22<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
23             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
24             x:Class="MauiPlayground.SwitchDemo">
25    <StackLayout>
26        <Label Text="Switch binding demo" />
27        <HorizontalStackLayout>
28            <Switch x:Name="switchControl"
29                    IsToggled="{Binding Toggled, Mode=TwoWay}"
30                    Toggled="Toggled" />
31            <CheckBox IsChecked="{Binding Toggled, Mode=TwoWay}" />
32            <Label Text="{Binding Toggled}" />
33        </HorizontalStackLayout>
34
35        <Button Text="Toggle" Clicked="Toggle" />
36        <Label x:Name="manualLabel1" Text="Value set in button click handler" />
37        <Label x:Name="manualLabel2" Text="Value set in toggled handler" />
38    </StackLayout>
39</ContentPage>
40namespace MauiPlayground;
41
42public partial class SwitchDemo : ContentPage
43{
44    public SwitchDemo()
45    {
46        InitializeComponent();
47        BindingContext = new ViewModel();
48    }
49
50    private void Toggle(object sender, EventArgs e)
51    {
52        var vm = (ViewModel)BindingContext;
53        vm.Toggled = !vm.Toggled;
54        manualLabel1.Text = $"Set in click handler: {switchControl.IsToggled}";
55    }
56
57    private void Toggled(object sender, ToggledEventArgs e) =>
58        manualLabel2.Text = $"Set in toggled handler: {switchControl.IsToggled}";
59
60    private class ViewModel : ViewModelBase
61    {
62        private bool toggled;
63        public bool Toggled
64        {
65            get => toggled;
66            set => SetProperty(ref toggled, value);
67        }
68    }
69}
70

Screenshot of the emulator after clicking on the "Toggle" button, which updates the view-model:

Demonstration of Switch issue

Notes:

  • The checkbox (bound to the same VM property) has updated
  • The label next to the checkbox (bound to the same VM property) has updated
  • The label below the button indicates that switch.IsToggled is true
  • The label below that indicates that the Switch.Toggled event has been raised
  • The Switch itself has not changed visible state

Clicking on the Switch control directly does visually toggle it.

ListView sample code

ListViewDemo.xaml

1using System.ComponentModel;
2using System.Runtime.CompilerServices;
3
4namespace MauiPlayground;
5
6public class ViewModelBase : INotifyPropertyChanged
7{
8    public event PropertyChangedEventHandler PropertyChanged;
9
10    public bool SetProperty<T>(ref T field, T value, [CallerMemberName] string name = null)
11    {
12        if (EqualityComparer<T>.Default.Equals(field, value))
13        {
14            return false;
15        }
16        field = value;
17        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
18        return true;
19    }
20}
21<?xml version="1.0" encoding="utf-8" ?>
22<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
23             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
24             x:Class="MauiPlayground.SwitchDemo">
25    <StackLayout>
26        <Label Text="Switch binding demo" />
27        <HorizontalStackLayout>
28            <Switch x:Name="switchControl"
29                    IsToggled="{Binding Toggled, Mode=TwoWay}"
30                    Toggled="Toggled" />
31            <CheckBox IsChecked="{Binding Toggled, Mode=TwoWay}" />
32            <Label Text="{Binding Toggled}" />
33        </HorizontalStackLayout>
34
35        <Button Text="Toggle" Clicked="Toggle" />
36        <Label x:Name="manualLabel1" Text="Value set in button click handler" />
37        <Label x:Name="manualLabel2" Text="Value set in toggled handler" />
38    </StackLayout>
39</ContentPage>
40namespace MauiPlayground;
41
42public partial class SwitchDemo : ContentPage
43{
44    public SwitchDemo()
45    {
46        InitializeComponent();
47        BindingContext = new ViewModel();
48    }
49
50    private void Toggle(object sender, EventArgs e)
51    {
52        var vm = (ViewModel)BindingContext;
53        vm.Toggled = !vm.Toggled;
54        manualLabel1.Text = $"Set in click handler: {switchControl.IsToggled}";
55    }
56
57    private void Toggled(object sender, ToggledEventArgs e) =>
58        manualLabel2.Text = $"Set in toggled handler: {switchControl.IsToggled}";
59
60    private class ViewModel : ViewModelBase
61    {
62        private bool toggled;
63        public bool Toggled
64        {
65            get => toggled;
66            set => SetProperty(ref toggled, value);
67        }
68    }
69}
70<?xml version="1.0" encoding="utf-8" ?>
71<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
72             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
73             x:Class="MauiPlayground.ListViewDemo">
74    <StackLayout>
75        <Label Text="ListView binding demo" />
76        <ListView x:Name="listView" ItemsSource="{Binding Items}"
77                  SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
78                  VerticalOptions="Start"
79                  ItemSelected="ItemSelected"/>
80        <Label Text="{Binding SelectedItem}" />
81        <Button Text="Toggle" Clicked="Toggle" />
82        <Label x:Name="manualLabel1" Text="Text set in button click handler" />
83        <Label x:Name="manualLabel2" Text="Text set in item selected handler" />
84    </StackLayout>
85</ContentPage>
86

ListViewDemo.cs

1using System.ComponentModel;
2using System.Runtime.CompilerServices;
3
4namespace MauiPlayground;
5
6public class ViewModelBase : INotifyPropertyChanged
7{
8    public event PropertyChangedEventHandler PropertyChanged;
9
10    public bool SetProperty<T>(ref T field, T value, [CallerMemberName] string name = null)
11    {
12        if (EqualityComparer<T>.Default.Equals(field, value))
13        {
14            return false;
15        }
16        field = value;
17        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
18        return true;
19    }
20}
21<?xml version="1.0" encoding="utf-8" ?>
22<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
23             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
24             x:Class="MauiPlayground.SwitchDemo">
25    <StackLayout>
26        <Label Text="Switch binding demo" />
27        <HorizontalStackLayout>
28            <Switch x:Name="switchControl"
29                    IsToggled="{Binding Toggled, Mode=TwoWay}"
30                    Toggled="Toggled" />
31            <CheckBox IsChecked="{Binding Toggled, Mode=TwoWay}" />
32            <Label Text="{Binding Toggled}" />
33        </HorizontalStackLayout>
34
35        <Button Text="Toggle" Clicked="Toggle" />
36        <Label x:Name="manualLabel1" Text="Value set in button click handler" />
37        <Label x:Name="manualLabel2" Text="Value set in toggled handler" />
38    </StackLayout>
39</ContentPage>
40namespace MauiPlayground;
41
42public partial class SwitchDemo : ContentPage
43{
44    public SwitchDemo()
45    {
46        InitializeComponent();
47        BindingContext = new ViewModel();
48    }
49
50    private void Toggle(object sender, EventArgs e)
51    {
52        var vm = (ViewModel)BindingContext;
53        vm.Toggled = !vm.Toggled;
54        manualLabel1.Text = $"Set in click handler: {switchControl.IsToggled}";
55    }
56
57    private void Toggled(object sender, ToggledEventArgs e) =>
58        manualLabel2.Text = $"Set in toggled handler: {switchControl.IsToggled}";
59
60    private class ViewModel : ViewModelBase
61    {
62        private bool toggled;
63        public bool Toggled
64        {
65            get => toggled;
66            set => SetProperty(ref toggled, value);
67        }
68    }
69}
70<?xml version="1.0" encoding="utf-8" ?>
71<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
72             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
73             x:Class="MauiPlayground.ListViewDemo">
74    <StackLayout>
75        <Label Text="ListView binding demo" />
76        <ListView x:Name="listView" ItemsSource="{Binding Items}"
77                  SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
78                  VerticalOptions="Start"
79                  ItemSelected="ItemSelected"/>
80        <Label Text="{Binding SelectedItem}" />
81        <Button Text="Toggle" Clicked="Toggle" />
82        <Label x:Name="manualLabel1" Text="Text set in button click handler" />
83        <Label x:Name="manualLabel2" Text="Text set in item selected handler" />
84    </StackLayout>
85</ContentPage>
86namespace MauiPlayground;
87
88public partial class ListViewDemo : ContentPage
89{
90    public ListViewDemo()
91    {
92        InitializeComponent();
93        BindingContext = new ViewModel();
94    }
95
96    private void Toggle(object sender, EventArgs e)
97    {
98        var vm = (ViewModel)BindingContext;
99        vm.SelectedItem = vm.SelectedItem == "First" ? "Second" : "First";
100        manualLabel1.Text = $"Set in click handler: {listView.SelectedItem}";
101    }
102
103    private void ItemSelected(object sender, EventArgs e) =>
104        manualLabel2.Text = $"Set in item selected handler: {listView.SelectedItem}";
105
106    private class ViewModel : ViewModelBase
107    {
108        public List<string> Items { get; } = new List<string> { "First", "Second" };
109
110        private string selectedItem = "First";
111        public string SelectedItem
112        {
113            get => selectedItem;
114            set => SetProperty(ref selectedItem, value);
115        }
116    }
117}
118

Screenshot of the emulator after clicking on the "Toggle" button, which updates the view-model:

Demonstration of ListView issue

Notes:

  • The label below the list view (bound to the same VM property) has updated
  • The label below the button indicates that listView.SelectedItem has the new value
  • The label below that indicates that the ListView.ItemSelected event has been raised
  • The ListView itself appears to have no selected item

Interestingly, the list view does actually change appearance: before clicking on the button, the first item is visually selected (in orange). Selecting an item from the list manually updates all the properties, but we don't see the selected item in orange.

ANSWER

Answered 2022-Apr-09 at 18:07

These both may be bugs with the currently released version of MAUI.

This bug was recently posted and there is already a fix for the Switch to address this issue.

Source https://stackoverflow.com/questions/71810199

QUESTION

The unauthenticated git protocol on port 9418 is no longer supported

Asked 2022-Mar-27 at 13:23

I have been using github actions for quite sometime but today my deployments started failing. Below is the error from github action logs

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7

Upon investigation, it appears that below section in my yml file is causing the issue.

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9

I have looked into this change log but can't seem to comprehend the issue.

Additional Details: Server: EC2 Instance Github actions steps:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55

package.json file

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234

ANSWER

Answered 2022-Mar-16 at 07:01

First, this error message is indeed expected on Jan. 11th, 2022.
See "Improving Git protocol security on GitHub".

January 11, 2022 Final brownout.

This is the full brownout period where we’ll temporarily stop accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol.
This will help clients discover any lingering use of older keys or old URLs.

Second, check your package.json dependencies for any git:// URL, as in this example, fixed in this PR.

As noted by Jörg W Mittag:

There was a 4-month warning.
The entire Internet has been moving away from unauthenticated, unencrypted protocols for a decade, it's not like this is a huge surprise.

Personally, I consider it less an "issue" and more "detecting unmaintained dependencies".

Plus, this is still only the brownout period, so the protocol will only be disabled for a short period of time, allowing developers to discover the problem.

The permanent shutdown is not until March 15th.


For GitHub Actions:

As in actions/checkout issue 14, you can add as a first step:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
236

That will change any git://github.com/ into https://github.com/.

For local projects

For all your repositories, you can set:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
236git config --global url."https://github.com/".insteadOf git://github.com/
237

You can also use SSH, but GitHub Security reminds us that, as of March 15th, 2022, GitHub stopped accepting DSA keys. RSA keys uploaded after Nov 2, 2021 will work only with SHA-2 signatures.
The deprecated MACs, ciphers, and unencrypted Git protocol are permanently disabled.

So this (with the right key) would work:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
236git config --global url."https://github.com/".insteadOf git://github.com/
237git config --global url."git@github.com:".insteadOf git://github.com/
238

That will change any git://github.com/ (unencrypted Git protocol) into git@github.com: (SSH URL).

Source https://stackoverflow.com/questions/70663523

QUESTION

Attempting to register a user on my devise app causes undefined method `user_url' for #<Devise::RegistrationsController:0x0000000000d9d0>

Asked 2022-Mar-04 at 13:29

I am getting this error when I try to sign up a user. After this error, I'm still able to sign in with the user it would've created, but it always shows me this upon registration. Please let me know if there's other information you need. Been stumped on this for a few days.

enter image description here

Here is the exception causes: enter image description here

Here is the callback for the error:

1actionpack (7.0.0) lib/action_dispatch/routing/polymorphic_routes.rb:231:in `public_send' 
2actionpack (7.0.0) lib/action_dispatch/routing/polymorphic_routes.rb:231:in `polymorphic_method' 
3actionpack (7.0.0) lib/action_dispatch/routing/polymorphic_routes.rb:116:in `polymorphic_url' 
4actionpack (7.0.0) lib/action_dispatch/routing/url_for.rb:187:in `full_url_for' 
5actionpack (7.0.0) lib/action_dispatch/routing/url_for.rb:170:in `url_for' 
6actionpack (7.0.0) lib/action_controller/metal/redirecting.rb:144:in `_compute_redirect_to_location' 
7actionpack (7.0.0) lib/action_controller/metal/redirecting.rb:89:in `redirect_to' 
8actionpack (7.0.0) lib/action_controller/metal/flash.rb:62:in `redirect_to' 
9actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:42:in `block in redirect_to' 
10activesupport (7.0.0) lib/active_support/notifications.rb:206:in `block in instrument' 
11activesupport (7.0.0) lib/active_support/notifications/instrumenter.rb:24:in `instrument' 
12activesupport (7.0.0) lib/active_support/notifications.rb:206:in `instrument' 
13actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:41:in `redirect_to' 
14responders (3.0.1) lib/action_controller/responder.rb:147:in `redirect_to' 
15responders (3.0.1) lib/action_controller/responder.rb:207:in `navigation_behavior' 
16responders (3.0.1) lib/action_controller/responder.rb:174:in `rescue in to_html' 
17responders (3.0.1) lib/action_controller/responder.rb:171:in `to_html' 
18responders (3.0.1) lib/action_controller/responder.rb:165:in `respond' 
19responders (3.0.1) lib/action_controller/responder.rb:158:in `call' 
20responders (3.0.1) lib/action_controller/respond_with.rb:213:in `respond_with' 
21devise (4.8.1) app/controllers/devise/registrations_controller.rb:25:in `create' 
22actionpack (7.0.0) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' 
23actionpack (7.0.0) lib/abstract_controller/base.rb:214:in `process_action' 
24actionpack (7.0.0) lib/action_controller/metal/rendering.rb:53:in `process_action' 
25actionpack (7.0.0) lib/abstract_controller/callbacks.rb:234:in `block in process_action' 
26activesupport (7.0.0) lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
27actiontext (7.0.0) lib/action_text/rendering.rb:20:in `with_renderer' 
28actiontext (7.0.0) lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>' 
29activesupport (7.0.0) lib/active_support/callbacks.rb:127:in `instance_exec' 
30activesupport (7.0.0) lib/active_support/callbacks.rb:127:in `block in run_callbacks' 
31activesupport (7.0.0) lib/active_support/callbacks.rb:138:in `run_callbacks' 
32actionpack (7.0.0) lib/abstract_controller/callbacks.rb:233:in `process_action' 
33actionpack (7.0.0) lib/action_controller/metal/rescue.rb:22:in `process_action' 
34actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action' 
35activesupport (7.0.0) lib/active_support/notifications.rb:206:in `block in instrument' 
36activesupport (7.0.0) lib/active_support/notifications/instrumenter.rb:24:in `instrument' 
37activesupport (7.0.0) lib/active_support/notifications.rb:206:in `instrument' 
38actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:66:in `process_action' 
39actionpack (7.0.0) lib/action_controller/metal/params_wrapper.rb:259:in `process_action' 
40activerecord (7.0.0) lib/active_record/railties/controller_runtime.rb:27:in `process_action' 
41actionpack (7.0.0) lib/abstract_controller/base.rb:151:in `process' 
42actionview (7.0.0) lib/action_view/rendering.rb:39:in `process' 
43actionpack (7.0.0) lib/action_controller/metal.rb:188:in `dispatch' 
44actionpack (7.0.0) lib/action_controller/metal.rb:251:in `dispatch' 
45actionpack (7.0.0) lib/action_dispatch/routing/route_set.rb:49:in `dispatch' 
46actionpack (7.0.0) lib/action_dispatch/routing/route_set.rb:32:in `serve' 
47actionpack (7.0.0) lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>' 
48actionpack (7.0.0) lib/action_dispatch/routing/mapper.rb:48:in `serve' 
49actionpack (7.0.0) lib/action_dispatch/journey/router.rb:50:in `block in serve' 
50actionpack (7.0.0) lib/action_dispatch/journey/router.rb:32:in `each' 
51actionpack (7.0.0) lib/action_dispatch/journey/router.rb:32:in `serve' 
52actionpack (7.0.0) lib/action_dispatch/routing/route_set.rb:850:in `call' 
53warden (1.2.9) lib/warden/manager.rb:36:in `block in call' 
54warden (1.2.9) lib/warden/manager.rb:34:in `catch' 
55warden (1.2.9) lib/warden/manager.rb:34:in `call' 
56rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call' 
57rack (2.2.3) lib/rack/etag.rb:27:in `call' 
58rack (2.2.3) lib/rack/conditional_get.rb:40:in `call' 
59rack (2.2.3) lib/rack/head.rb:12:in `call' 
60actionpack (7.0.0) lib/action_dispatch/http/permissions_policy.rb:22:in `call' 
61actionpack (7.0.0) lib/action_dispatch/http/content_security_policy.rb:18:in `call' 
62rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context' 
63rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call' 
64actionpack (7.0.0) lib/action_dispatch/middleware/cookies.rb:693:in `call' 
65activerecord (7.0.0) lib/active_record/migration.rb:603:in `call' 
66actionpack (7.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call' 
67activesupport (7.0.0) lib/active_support/callbacks.rb:99:in `run_callbacks' 
68actionpack (7.0.0) lib/action_dispatch/middleware/callbacks.rb:26:in `call' 
69actionpack (7.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call' 
70actionpack (7.0.0) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call' 
71actionpack (7.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call' 
72web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app' 
73web-console (4.2.0) lib/web_console/middleware.rb:28:in `block in call' 
74web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch' 
75web-console (4.2.0) lib/web_console/middleware.rb:17:in `call' 
76actionpack (7.0.0) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call' 
77railties (7.0.0) lib/rails/rack/logger.rb:36:in `call_app' 
78railties (7.0.0) lib/rails/rack/logger.rb:25:in `block in call' 
79activesupport (7.0.0) lib/active_support/tagged_logging.rb:99:in `block in tagged' 
80activesupport (7.0.0) lib/active_support/tagged_logging.rb:37:in `tagged' 
81activesupport (7.0.0) lib/active_support/tagged_logging.rb:99:in `tagged' 
82railties (7.0.0) lib/rails/rack/logger.rb:25:in `call' 
83sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call' 
84actionpack (7.0.0) lib/action_dispatch/middleware/remote_ip.rb:93:in `call' 
85actionpack (7.0.0) lib/action_dispatch/middleware/request_id.rb:26:in `call' 
86rack (2.2.3) lib/rack/method_override.rb:24:in `call' 
87rack (2.2.3) lib/rack/runtime.rb:22:in `call' 
88activesupport (7.0.0) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' 
89actionpack (7.0.0) lib/action_dispatch/middleware/server_timing.rb:20:in `call' 
90actionpack (7.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call' 
91actionpack (7.0.0) lib/action_dispatch/middleware/static.rb:23:in `call' 
92rack (2.2.3) lib/rack/sendfile.rb:110:in `call' 
93actionpack (7.0.0) lib/action_dispatch/middleware/host_authorization.rb:137:in `call' 
94railties (7.0.0) lib/rails/engine.rb:530:in `call' 
95puma (5.5.2) lib/puma/configuration.rb:249:in `call' 
96puma (5.5.2) lib/puma/request.rb:77:in `block in handle_request' 
97puma (5.5.2) lib/puma/thread_pool.rb:340:in `with_force_shutdown' 
98puma (5.5.2) lib/puma/request.rb:76:in `handle_request' 
99puma (5.5.2) lib/puma/server.rb:447:in `process_client' 
100puma (5.5.2) lib/puma/thread_pool.rb:147:in `block in spawn_thread' 
101

My routes.rb:

1actionpack (7.0.0) lib/action_dispatch/routing/polymorphic_routes.rb:231:in `public_send' 
2actionpack (7.0.0) lib/action_dispatch/routing/polymorphic_routes.rb:231:in `polymorphic_method' 
3actionpack (7.0.0) lib/action_dispatch/routing/polymorphic_routes.rb:116:in `polymorphic_url' 
4actionpack (7.0.0) lib/action_dispatch/routing/url_for.rb:187:in `full_url_for' 
5actionpack (7.0.0) lib/action_dispatch/routing/url_for.rb:170:in `url_for' 
6actionpack (7.0.0) lib/action_controller/metal/redirecting.rb:144:in `_compute_redirect_to_location' 
7actionpack (7.0.0) lib/action_controller/metal/redirecting.rb:89:in `redirect_to' 
8actionpack (7.0.0) lib/action_controller/metal/flash.rb:62:in `redirect_to' 
9actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:42:in `block in redirect_to' 
10activesupport (7.0.0) lib/active_support/notifications.rb:206:in `block in instrument' 
11activesupport (7.0.0) lib/active_support/notifications/instrumenter.rb:24:in `instrument' 
12activesupport (7.0.0) lib/active_support/notifications.rb:206:in `instrument' 
13actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:41:in `redirect_to' 
14responders (3.0.1) lib/action_controller/responder.rb:147:in `redirect_to' 
15responders (3.0.1) lib/action_controller/responder.rb:207:in `navigation_behavior' 
16responders (3.0.1) lib/action_controller/responder.rb:174:in `rescue in to_html' 
17responders (3.0.1) lib/action_controller/responder.rb:171:in `to_html' 
18responders (3.0.1) lib/action_controller/responder.rb:165:in `respond' 
19responders (3.0.1) lib/action_controller/responder.rb:158:in `call' 
20responders (3.0.1) lib/action_controller/respond_with.rb:213:in `respond_with' 
21devise (4.8.1) app/controllers/devise/registrations_controller.rb:25:in `create' 
22actionpack (7.0.0) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' 
23actionpack (7.0.0) lib/abstract_controller/base.rb:214:in `process_action' 
24actionpack (7.0.0) lib/action_controller/metal/rendering.rb:53:in `process_action' 
25actionpack (7.0.0) lib/abstract_controller/callbacks.rb:234:in `block in process_action' 
26activesupport (7.0.0) lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
27actiontext (7.0.0) lib/action_text/rendering.rb:20:in `with_renderer' 
28actiontext (7.0.0) lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>' 
29activesupport (7.0.0) lib/active_support/callbacks.rb:127:in `instance_exec' 
30activesupport (7.0.0) lib/active_support/callbacks.rb:127:in `block in run_callbacks' 
31activesupport (7.0.0) lib/active_support/callbacks.rb:138:in `run_callbacks' 
32actionpack (7.0.0) lib/abstract_controller/callbacks.rb:233:in `process_action' 
33actionpack (7.0.0) lib/action_controller/metal/rescue.rb:22:in `process_action' 
34actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action' 
35activesupport (7.0.0) lib/active_support/notifications.rb:206:in `block in instrument' 
36activesupport (7.0.0) lib/active_support/notifications/instrumenter.rb:24:in `instrument' 
37activesupport (7.0.0) lib/active_support/notifications.rb:206:in `instrument' 
38actionpack (7.0.0) lib/action_controller/metal/instrumentation.rb:66:in `process_action' 
39actionpack (7.0.0) lib/action_controller/metal/params_wrapper.rb:259:in `process_action' 
40activerecord (7.0.0) lib/active_record/railties/controller_runtime.rb:27:in `process_action' 
41actionpack (7.0.0) lib/abstract_controller/base.rb:151:in `process' 
42actionview (7.0.0) lib/action_view/rendering.rb:39:in `process' 
43actionpack (7.0.0) lib/action_controller/metal.rb:188:in `dispatch' 
44actionpack (7.0.0) lib/action_controller/metal.rb:251:in `dispatch' 
45actionpack (7.0.0) lib/action_dispatch/routing/route_set.rb:49:in `dispatch' 
46actionpack (7.0.0) lib/action_dispatch/routing/route_set.rb:32:in `serve' 
47actionpack (7.0.0) lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>' 
48actionpack (7.0.0) lib/action_dispatch/routing/mapper.rb:48:in `serve' 
49actionpack (7.0.0) lib/action_dispatch/journey/router.rb:50:in `block in serve' 
50actionpack (7.0.0) lib/action_dispatch/journey/router.rb:32:in `each' 
51actionpack (7.0.0) lib/action_dispatch/journey/router.rb:32:in `serve' 
52actionpack (7.0.0) lib/action_dispatch/routing/route_set.rb:850:in `call' 
53warden (1.2.9) lib/warden/manager.rb:36:in `block in call' 
54warden (1.2.9) lib/warden/manager.rb:34:in `catch' 
55warden (1.2.9) lib/warden/manager.rb:34:in `call' 
56rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call' 
57rack (2.2.3) lib/rack/etag.rb:27:in `call' 
58rack (2.2.3) lib/rack/conditional_get.rb:40:in `call' 
59rack (2.2.3) lib/rack/head.rb:12:in `call' 
60actionpack (7.0.0) lib/action_dispatch/http/permissions_policy.rb:22:in `call' 
61actionpack (7.0.0) lib/action_dispatch/http/content_security_policy.rb:18:in `call' 
62rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context' 
63rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call' 
64actionpack (7.0.0) lib/action_dispatch/middleware/cookies.rb:693:in `call' 
65activerecord (7.0.0) lib/active_record/migration.rb:603:in `call' 
66actionpack (7.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call' 
67activesupport (7.0.0) lib/active_support/callbacks.rb:99:in `run_callbacks' 
68actionpack (7.0.0) lib/action_dispatch/middleware/callbacks.rb:26:in `call' 
69actionpack (7.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call' 
70actionpack (7.0.0) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call' 
71actionpack (7.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call' 
72web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app' 
73web-console (4.2.0) lib/web_console/middleware.rb:28:in `block in call' 
74web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch' 
75web-console (4.2.0) lib/web_console/middleware.rb:17:in `call' 
76actionpack (7.0.0) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call' 
77railties (7.0.0) lib/rails/rack/logger.rb:36:in `call_app' 
78railties (7.0.0) lib/rails/rack/logger.rb:25:in `block in call' 
79activesupport (7.0.0) lib/active_support/tagged_logging.rb:99:in `block in tagged' 
80activesupport (7.0.0) lib/active_support/tagged_logging.rb:37:in `tagged' 
81activesupport (7.0.0) lib/active_support/tagged_logging.rb:99:in `tagged' 
82railties (7.0.0) lib/rails/rack/logger.rb:25:in `call' 
83sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call' 
84actionpack (7.0.0) lib/action_dispatch/middleware/remote_ip.rb:93:in `call' 
85actionpack (7.0.0) lib/action_dispatch/middleware/request_id.rb:26:in `call' 
86rack (2.2.3) lib/rack/method_override.rb:24:in `call' 
87rack (2.2.3) lib/rack/runtime.rb:22:in `call' 
88activesupport (7.0.0) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' 
89actionpack (7.0.0) lib/action_dispatch/middleware/server_timing.rb:20:in `call' 
90actionpack (7.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call' 
91actionpack (7.0.0) lib/action_dispatch/middleware/static.rb:23:in `call' 
92rack (2.2.3) lib/rack/sendfile.rb:110:in `call' 
93actionpack (7.0.0) lib/action_dispatch/middleware/host_authorization.rb:137:in `call' 
94railties (7.0.0) lib/rails/engine.rb:530:in `call' 
95puma (5.5.2) lib/puma/configuration.rb:249:in `call' 
96puma (5.5.2) lib/puma/request.rb:77:in `block in handle_request' 
97puma (5.5.2) lib/puma/thread_pool.rb:340:in `with_force_shutdown' 
98puma (5.5.2) lib/puma/request.rb:76:in `handle_request' 
99puma (5.5.2) lib/puma/server.rb:447:in `process_client' 
100puma (5.5.2) lib/puma/thread_pool.rb:147:in `block in spawn_thread' 
101Rails.application.routes.draw do
102  devise_for :users
103  resources :teachers
104  resources :offices
105  # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
106
107  # Defines the root path route ("/")
108  root to: "offices#index"
109  # root "articles#index"
110end
111

ANSWER

Answered 2022-Jan-03 at 12:08

This seems to a be a known issue with Rails 7 and Devise now. To fix it in the meantime simply add the following line to your devise.rb.

config.navigational_formats = ['*/*', :html, :turbo_stream]

Source: https://github.com/heartcombo/devise/issues/5439

Source https://stackoverflow.com/questions/70413914

QUESTION

How to install the Bumblebee 2021.1.1 Android Studio Patch?

Asked 2022-Feb-10 at 19:28

When I open Android Studio I receive a notification saying that an update is available:

1The latest stable release of Android Studio is now available for download.
2
3Android Studio Bumblebee | 2021.1.1 Patch 1 is a major new release and includes performance improvements, bug fixes and new features.
4
5- Intellij 2021.1.1 Platform Update
6- New Device Manager
7- ADB over Wi-Fi
8- Run Instrumented Tests in Android Studio using Gradle
9- Android Gradle Plugin Upgrade Assistant now updates API usage
10- Non-Transitive R classes on for new projects
11- Apple Silicon Support Update
12- Jank detection track in Profilers
13- Profileable app profiling support in Studio Profilers
14- Network Inspection and ability to capture Layout Inspector snapshots
15- Support for Compose semantics in the Layout Inspector
16- Interactive Preview
17- Animated Vector Drawables Preview
18- Updated Device picker for Design Tools
19
20Important After updating, you need to restart Android Studio to apply any memory settings you migrate from an earlier version of the IDE.
21Release Notes
22

However when I click on the Download button it opens a web page to re-download the whole program instead of updating it. It's a bit confusing because it's a minor update.

ANSWER

Answered 2022-Feb-10 at 11:09

This issue was fixed by Google (10 February 2022).

You can now update Android Studio normally.

Thank you all for helping to bring this problem to Google's attention.

Source https://stackoverflow.com/questions/71006400

QUESTION

What is the correct way to install Android Studio Bumblebee 2021.1.1 Patch 1

Asked 2022-Feb-10 at 11:10

I am sorry but I am really confused and leery now, so I am resorting to SO to get some clarity.

I am running Android Studio Bumblebee and saw a notification about a major new release wit the following text:

1Android Studio Bumblebee | 2021.1.1 Patch 1 is a major new release and includes performance improvements, bug fixes and new features.
2Intellij 2021.1.1 Platform Update
3New Device Manager
4ADB over Wi-Fi
5Run Instrumented Tests in Android Studio using Gradle
6Android Gradle Plugin Upgrade Assistant now updates API usage
7Non-Transitive R classes on for new projects
8Apple Silicon Support Update
9Jank detection track in Profilers
10Profileable app profiling support in Studio Profilers
11Network Inspection and ability to capture Layout Inspector snapshots
12Support for Compose semantics in the Layout Inspector
13Interactive Preview
14Animated Vector Drawables Preview
15Updated Device picker for Design Tools
16Important After updating, you need to restart Android Studio to apply any memory settings you migrate from an earlier version of the IDE.
17

When I click "Release Notes", I see "This minor update includes the following bug fixes:...". However, when I click "Download", a download page is opened. I am really puzzled by this because I thought a minor update would not require installing the entire thing. The notes for Android Studio - Bumblebee | 2021.1.1 Patch 1 indicates downloading the entire package is not needed:

If you already have an Android Studio build on the Stable channel, you can get the update by clicking Help > Check for Update (Android Studio

Check for Updates on macOS). Otherwise, you can download it here.

I did a search and found people are having poor experiences with this update. Could anyone shed some light on this before I plunge into a potential disaster?

I am eager to update Bumblebee because it keeps crashing.

ANSWER

Answered 2022-Feb-10 at 11:10

This issue was fixed by Google (10 February 2022).

You can now update Android Studio normally.

Source https://stackoverflow.com/questions/70999801

QUESTION

Error: Requiring module "node_modules\react-native-reanimated\src\Animated.js",

Asked 2022-Feb-09 at 06:51

I am trying to use createDrawerNavigator from import { createDrawerNavigator } from '@react-navigation/drawer'; in react native. However, I am getting the error below, which I don't know how to solve.

Error: Requiring module "node_modules\react-native-reanimated\src\Animated.js", which threw an exception: Error: Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?

In babel.config.js I tried to add the below code but not working as well

1module.exports = function(api) {
2  api.cache(true);
3  return {
4    presets: ['babel-preset-expo'],
5    plugins: [
6      'react-native-reanimated/plugin',
7    ]
8  };
9};
10

Below is my component

1module.exports = function(api) {
2  api.cache(true);
3  return {
4    presets: ['babel-preset-expo'],
5    plugins: [
6      'react-native-reanimated/plugin',
7    ]
8  };
9};
10import * as React from 'react';
11import { Button, View } from 'react-native';
12import { createDrawerNavigator } from '@react-navigation/drawer';
13import { NavigationContainer } from '@react-navigation/native';
14
15function HomeScreen({ navigation }) {
16  return (
17    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
18      <Button
19        onPress={() => navigation.navigate('Notifications')}
20        title="Go to notifications"
21      />
22    </View>
23  );
24}
25
26function NotificationsScreen({ navigation }) {
27  return (
28    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
29      <Button onPress={() => navigation.goBack()} title="Go back home" />
30    </View>
31  );
32}
33
34const Drawer = createDrawerNavigator();
35
36export default function MyDrawer() {
37  return (
38    <NavigationContainer>
39      <Drawer.Navigator initialRouteName="Home">
40        <Drawer.Screen name="Home" component={HomeScreen} />
41        <Drawer.Screen name="Notifications" component={NotificationsScreen} />
42      </Drawer.Navigator>
43    </NavigationContainer>
44  );
45}
46

ANSWER

Answered 2021-Dec-31 at 10:32

Please complete the setup for react-native-reanimated. You have to add 'react-native-reanimated/plugin', in the babel.config.js file so the final code in babel.config.js will look like

1module.exports = function(api) {
2  api.cache(true);
3  return {
4    presets: ['babel-preset-expo'],
5    plugins: [
6      'react-native-reanimated/plugin',
7    ]
8  };
9};
10import * as React from 'react';
11import { Button, View } from 'react-native';
12import { createDrawerNavigator } from '@react-navigation/drawer';
13import { NavigationContainer } from '@react-navigation/native';
14
15function HomeScreen({ navigation }) {
16  return (
17    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
18      <Button
19        onPress={() => navigation.navigate('Notifications')}
20        title="Go to notifications"
21      />
22    </View>
23  );
24}
25
26function NotificationsScreen({ navigation }) {
27  return (
28    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
29      <Button onPress={() => navigation.goBack()} title="Go back home" />
30    </View>
31  );
32}
33
34const Drawer = createDrawerNavigator();
35
36export default function MyDrawer() {
37  return (
38    <NavigationContainer>
39      <Drawer.Navigator initialRouteName="Home">
40        <Drawer.Screen name="Home" component={HomeScreen} />
41        <Drawer.Screen name="Notifications" component={NotificationsScreen} />
42      </Drawer.Navigator>
43    </NavigationContainer>
44  );
45}
46module.exports = {
47      ...
48      plugins: [
49          ...
50          'react-native-reanimated/plugin',
51      ],
52  };
53

As state in the setup docs for react-native-reanimatedHere

Also you need to complete setup for android as well (if not done yet) as stated Here

If you are using expo then follow these steps

Finally, run expo r -c to clear the cache.

Source https://stackoverflow.com/questions/70516450

QUESTION

flutter permission Handler grant not showing on iOS

Asked 2022-Feb-02 at 18:56

i created a class to ask for permission immediately it get to login, it show on Android but on iOs i am not seeing any permission grant.

1class PermissionService {
2  Future permissionHandler() async {
3    await Permission.contacts.shouldShowRequestRationale;
4    if (await Permission.contacts.request().isGranted) {
5      // Either the permission was already granted before or the user just granted it.
6    }
7    Map<Permission, PermissionStatus> statuses = await [
8      Permission.locationWhenInUse,
9      Permission.locationAlways,
10      Permission.photos,
11      Permission.camera,
12      Permission.location,
13      Permission.microphone,
14      Permission.notification,
15    ].request();
16
17    if (statuses[Permission.location].isDenied) {
18      print("Location permission is denied.");
19    }
20
21    if (statuses[Permission.camera].isDenied) {
22      print("Camera permission is denied.");
23    }
24    if (statuses[Permission.photos].isDenied) {
25      print("Photos permission is denied.");
26    }
27    if (statuses[Permission.notification].isDenied) {
28      print("Notification permission is denied.");
29    }
30    if (statuses[Permission.microphone].isDenied) {
31      print("Microphone permission is denied.");
32    }
33    if (statuses[Permission.locationWhenInUse].isDenied) {
34      print("locationWhenInUse permission is denied.");
35    }
36    if (statuses[Permission.locationAlways].isDenied) {
37      print("locationAlways permission is denied.");
38    }
39  }
40}
41

and i call this function in the initstate of the Login.dart

ANSWER

Answered 2022-Feb-02 at 18:56

The permission_handler package introduced a breaking change in version 8.0.0, see changelog. Permissions on iOS are disabled by default, and you have the set the correct GCC_PREPROCESSOR_DEFINITIONS in you Podfile. An example Podfile can be found here, but basically you have to add this to you Podfile, set the permissions that you don't use to 0:

1class PermissionService {
2  Future permissionHandler() async {
3    await Permission.contacts.shouldShowRequestRationale;
4    if (await Permission.contacts.request().isGranted) {
5      // Either the permission was already granted before or the user just granted it.
6    }
7    Map<Permission, PermissionStatus> statuses = await [
8      Permission.locationWhenInUse,
9      Permission.locationAlways,
10      Permission.photos,
11      Permission.camera,
12      Permission.location,
13      Permission.microphone,
14      Permission.notification,
15    ].request();
16
17    if (statuses[Permission.location].isDenied) {
18      print("Location permission is denied.");
19    }
20
21    if (statuses[Permission.camera].isDenied) {
22      print("Camera permission is denied.");
23    }
24    if (statuses[Permission.photos].isDenied) {
25      print("Photos permission is denied.");
26    }
27    if (statuses[Permission.notification].isDenied) {
28      print("Notification permission is denied.");
29    }
30    if (statuses[Permission.microphone].isDenied) {
31      print("Microphone permission is denied.");
32    }
33    if (statuses[Permission.locationWhenInUse].isDenied) {
34      print("locationWhenInUse permission is denied.");
35    }
36    if (statuses[Permission.locationAlways].isDenied) {
37      print("locationAlways permission is denied.");
38    }
39  }
40}
41post_install do |installer|
42  installer.pods_project.targets.each do |target|
43    flutter_additional_ios_build_settings(target)
44    target.build_configurations.each do |config|
45      # You can remove unused permissions here
46      # for more infomation: https://github.com/BaseflowIT/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h
47      # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0'
48      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
49        '$(inherited)',
50        ## dart: PermissionGroup.calendar
51        'PERMISSION_EVENTS=1',
52        ## dart: PermissionGroup.reminders
53        'PERMISSION_REMINDERS=1',
54        ## dart: PermissionGroup.contacts
55        'PERMISSION_CONTACTS=1',
56        ## dart: PermissionGroup.camera
57        'PERMISSION_CAMERA=1',
58        ## dart: PermissionGroup.microphone
59        'PERMISSION_MICROPHONE=1',
60        ## dart: PermissionGroup.speech
61        'PERMISSION_SPEECH_RECOGNIZER=1',
62        ## dart: PermissionGroup.photos
63        'PERMISSION_PHOTOS=1',
64        ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
65        'PERMISSION_LOCATION=1',
66        ## dart: PermissionGroup.notification
67        'PERMISSION_NOTIFICATIONS=1',
68        ## dart: PermissionGroup.mediaLibrary
69        'PERMISSION_MEDIA_LIBRARY=1',
70        ## dart: PermissionGroup.sensors
71        'PERMISSION_SENSORS=1',
72        ## dart: PermissionGroup.bluetooth
73        'PERMISSION_BLUETOOTH=1',
74        ## dart: PermissionGroup.appTrackingTransparency
75        'PERMISSION_APP_TRACKING_TRANSPARENCY=1',
76        ## dart: PermissionGroup.criticalAlerts
77        'PERMISSION_CRITICAL_ALERTS=1',
78      ]
79    end
80  end
81end
82

Edit 1: Once that is done, save your Podfile and then stop the current instance of the project since hot restart will not reflect the changes. Rebuild the project and permission_handler requests should now be working perfectly.

Edit 2: As suggested by @YugankaSharan it might be necessary to run pod install for the changes to take effect.

Source https://stackoverflow.com/questions/68599765

QUESTION

Vue 3: Module '"../../node_modules/vue/dist/vue"' has no exported member

Asked 2022-Jan-24 at 08:38

After updating my npm packages, some of the imports from the 'vue' module started showing errors:

TS2305: Module '"../../node_modules/vue/dist/vue"' has no exported member 'X'

where X is nextTick, onMounted, ref, watch etc. When serving the project, Vue says it's "failed to compile". WebStorm actually recognizes the exports, suggests them and shows types, but the error is shown regardless. Some exports like computed and defineComponent work just fine.

What I've tried:

  • Rollback to the previously used Vue version "3.2.2" > "3.0.11". It makes the abovementioned type errors disappear, but the app stops working entirely, showing lots of TypeError: Object(...) is not a function errors in console and not rendering the app at all. In the terminal, some new warnings are introduced: "export 'X' (imported as '_X') was not found in 'vue' where X is createElementBlock, createElementVNode, normalizeClass and normalizeStyle.
  • Rollback other dependencies. None of the ones that I tried helped fix the problem, unfortunately.
  • Manually declare the entirety of 'vue' module. We can declare the 'vue' module exports in shims-vue.d.ts, and it actually makes the errors disappear, however, this seems like a terrible, time-consuming workaround, so I would opt out for a better solution if possible.

My full list of dependencies:

1"dependencies": {
2   "@capacitor/android": "3.0.0",
3   "@capacitor/app": "1.0.0",
4   "@capacitor/core": "3.0.0",
5   "@capacitor/haptics": "1.0.0",
6   "@capacitor/keyboard": "1.0.0",
7   "@capacitor/push-notifications": "^1.0.3",
8   "@google-pay/button-element": "^2.5.0",
9   "@ionic-native/core": "^5.34.0",
10   "@ionic-native/qr-scanner": "^5.35.0",
11   "@ionic-native/vibration": "^5.34.0",
12   "@ionic/vue": "^5.4.0",
13   "@ionic/vue-router": "^5.4.0",
14   "@j-t-mcc/vue3-chartjs": "^1.1.2",
15   "chart.js": "^3.4.1",
16   "chartjs-plugin-datalabels": "^2.0.0",
17   "color": "^3.1.3",
18   "cordova-plugin-background-mode": "^0.7.3",
19   "cordova-plugin-device": "^2.0.3",
20   "cordova-plugin-qrscanner": "^3.0.1",
21   "core-js": "^3.6.5",
22   "firebase": "^8.6.2",
23   "numeral": "^2.0.6",
24   "pug": "^3.0.2",
25   "pug-plain-loader": "^1.1.0",
26   "secure-ls": "^1.2.6",
27   "uuid": "^8.3.2",
28   "v-cupertino": "^1.2.4",
29   "vue": "^3.2.0",
30   "vue-chartjs": "^3.5.1",
31   "vue-i18n": "^9.1.3",
32   "vue-numerals": "^4.0.6",
33   "vue-router": "^4.0.0-0",
34   "vuex": "^4.0.1"
35 },
36 "devDependencies": {
37   "@capacitor/cli": "3.0.0",
38   "@types/jest": "^24.0.19",
39   "@types/uuid": "^8.3.1",
40   "@typescript-eslint/eslint-plugin": "^2.33.0",
41   "@typescript-eslint/parser": "^2.33.0",
42   "@vue/cli-plugin-babel": "~4.5.0",
43   "@vue/cli-plugin-e2e-cypress": "~4.5.0",
44   "@vue/cli-plugin-eslint": "^4.5.13",
45   "@vue/cli-plugin-router": "~4.5.0",
46   "@vue/cli-plugin-typescript": "~4.5.0",
47   "@vue/cli-plugin-unit-jest": "~4.5.0",
48   "@vue/cli-service": "~4.5.0",
49   "@vue/compiler-sfc": "^3.0.0-0",
50   "@vue/eslint-config-typescript": "^5.0.2",
51   "@vue/test-utils": "^2.0.0-0",
52   "eslint": "^6.7.2",
53   "eslint-plugin-vue": "^7.0.0-0",
54   "stylus": "^0.54.7",
55   "stylus-loader": "^3.0.2",
56   "typescript": "~3.9.3",
57   "vue-jest": "^5.0.0-0"
58 }
59

ANSWER

Answered 2021-Aug-15 at 13:53

That named exports from composition API are unavailable means that vue is Vue 2 at some place which has only default export. Since Vue 3 is in dependencies and both lock file and node_modules were refreshed, this means that Vue 2 is nested dependency of some direct dependency.

The problem needs to be investigated in lock file. It shows that @vue/cli-plugin-unit-jest@4.5.13 depends on vue-jest@3 which depends on vue@2.

A possible solution is to upgrade @vue/cli-plugin-unit-jest to the latest version, next. The same likely applies to other @vue/cli-* packages because they have matching versions.

Source https://stackoverflow.com/questions/68790790

QUESTION

clarity.js by Microsoft slowing overall page loads

Asked 2022-Jan-17 at 16:40

I have a customer using bing tracking via https://bat.bing.com/bat.js.

On December, 6th 2021 it started calling in clarity.js without the customer making any changes to their code.

This slowed the overall page load by 1 second on mobile and 500ms on desktop. I've been trying to figure out how to disable this JS but I'm not sure what to do as it's being fired from the bing tracking js.

The bing tracking code is being triggered via google tag manager.

Anyone else having this issue and know how to disable clarity.js from being called at all?

enter image description here

Customer is using Wordpress. Amazing Bing can implement code that slows down a site overall page speed without any notification to the customer.

ANSWER

Answered 2021-Dec-17 at 18:16

We figured this out by going into our bing web tools and disabling the Clarity integration.

Source https://stackoverflow.com/questions/70281265

QUESTION

expo-barcode-scanner only works once with react-native version 0.64.2 and expo 43.0.0

Asked 2022-Jan-12 at 17:35

Because of Google Play, I had to update an old project of mine to the latest expo versions (version 43.0.0 to be exact). The idea is for the app to scan a QRCode and process the data, simply. However, expo-barcode-scanner only works once and after that I need to close and open the app again to work. Has anyone encountered this problem and (or) knows how to solve it? Below is my code:

1{escaneando ? (
2                        <BarCodeScanner
3                            barCodeTypes={[
4                                BarCodeScanner.Constants.BarCodeType.ean13,
5                                BarCodeScanner.Constants.BarCodeType.ean8,
6                                BarCodeScanner.Constants.BarCodeType.upc_a,
7                                BarCodeScanner.Constants.BarCodeType.upc_e,
8                            ]}
9                            onBarCodeScanned={this.handleBarCode.bind(this)}
10                            style={[StyleSheet.absoluteFillObject, styles.barscan]}
11                        />
12                    ) : null}
13

And library specifications:

1{escaneando ? (
2                        <BarCodeScanner
3                            barCodeTypes={[
4                                BarCodeScanner.Constants.BarCodeType.ean13,
5                                BarCodeScanner.Constants.BarCodeType.ean8,
6                                BarCodeScanner.Constants.BarCodeType.upc_a,
7                                BarCodeScanner.Constants.BarCodeType.upc_e,
8                            ]}
9                            onBarCodeScanned={this.handleBarCode.bind(this)}
10                            style={[StyleSheet.absoluteFillObject, styles.barscan]}
11                        />
12                    ) : null}
13"@react-native-community/masked-view": "^0.1.11",
14    "@react-native-community/netinfo": "^6.0.5",
15    "@react-navigation/native": "^6.0.6",
16    "@react-navigation/stack": "^6.0.11",
17    "expo": "~43.0.0",
18    "expo-av": "^10.1.3",
19    "expo-barcode-scanner": "^11.1.2",
20    "expo-status-bar": "~1.1.0",
21    "lodash": "^4.17.21",
22    "react": "17.0.1",
23    "react-dom": "17.0.1",
24    "react-native": "^0.64.2",
25    "react-native-dropdownalert": "^4.3.0",
26    "react-native-elements": "^3.4.2",
27    "react-native-gesture-handler": "^1.10.3",
28    "react-native-in-app-notification": "^3.2.0",
29    "react-native-offline": "^6.0.0",
30    "react-native-paper": "^4.10.0",
31    "react-native-reanimated": "^2.2.3",
32    "react-native-safe-area-context": "^3.3.2",
33    "react-native-screens": "^3.9.0",
34    "react-native-web": "0.17.1",
35    "react-navigation": "^4.4.4",
36    "react-redux": "^7.2.6",
37    "redux": "^4.1.2",
38    "redux-thunk": "^2.4.0",
39    "reselect": "^4.1.2"
40

ANSWER

Answered 2021-Nov-12 at 21:14

Welcome @Backup Gov18,

This is a documented issue.

Note: Only one active BarCodeScanner preview is supported currently. When using navigation, the best practice is to unmount any previously rendered BarCodeScanner component so the following screens can use without issues.

There is a workaround.

Instead of conditionally rendering the <BarcodeScanner /> component, you could render it inside another dedicated screen component.

This way, after this new screen reads the barcode, you could navigate back to your first screen. Navigating back may unmount this new screen. You can force unmount if you need to.

As you are using react-navigation, you had better use .pop() instead of goBack().


Alternative

You can also use expo-camera instead of expo-barcode-scanner. expo-camera does not have this issue. It also offers more options like flashlight/torch and switching cameras.

Source https://stackoverflow.com/questions/69857156

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in Notification

Tutorials and Learning Resources are not available at this moment for Notification

Share this Page

share link

Get latest updates on Notification