This is related to Testing

Popular New Releases in Testing

jest

v28.0.0-alpha.11

cypress

9.5.4

Faker

lighthouse

googletest

v1.11.0

Popular Libraries in Testing

jest

by facebook doticontypescriptdoticon

star image 38648 doticonMIT

Delightful JavaScript Testing.

cypress

by cypress-io doticonjavascriptdoticon

star image 38055 doticonMIT

Fast, easy and reliable testing for anything that runs in a browser.

faker.js

by Marak doticonjavascriptdoticon

star image 33346 doticonNOASSERTION

generate massive amounts of realistic fake data in Node.js and the browser

PayloadsAllTheThings

by swisskyrepo doticonpythondoticon

star image 29854 doticonMIT

A list of useful payloads and bypass for Web Application Security and Pentest/CTF

Faker

by fzaninotto doticonphpdoticon

star image 26055 doticonNOASSERTION

Faker is a PHP library that generates fake data for you

lighthouse

by GoogleChrome doticonjavascriptdoticon

star image 24437 doticonApache-2.0

Automated auditing, performance metrics, and best practices for the web.

googletest

by google doticonc++doticon

star image 23619 doticonBSD-3-Clause

GoogleTest - Google Testing and Mocking Framework

selenium

by SeleniumHQ doticonjavadoticon

star image 23180 doticonApache-2.0

A browser automation framework and ecosystem.

sqlmap

by sqlmapproject doticonpythondoticon

star image 22565 doticonNOASSERTION

Automatic SQL injection and database takeover tool

Trending New libraries in Testing

nuclei

by projectdiscovery doticongodoticon

star image 7947 doticonMIT

Fast and customizable vulnerability scanner based on simple YAML based DSL.

metersphere

by metersphere doticonjavadoticon

star image 7173 doticonGPL-3.0

MeterSphere 是一站式开源持续测试平台,覆盖测试管理、接口测试、性能测试等。搞测试,就选 MeterSphere!

RustScan

by RustScan doticonrustdoticon

star image 6109 doticonGPL-3.0

🤖 The Modern Port Scanner 🤖

playwright-python

by microsoft doticonpythondoticon

star image 6103 doticonApache-2.0

Python version of the Playwright testing and automation library.

rengine

by yogeshojha doticonjavascriptdoticon

star image 3855 doticonGPL-3.0

reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.

tracy

by wolfpld doticonc++doticon

star image 3691 doticonNOASSERTION

C++ frame profiler

cypress-realworld-app

by cypress-io doticontypescriptdoticon

star image 3274 doticonMIT

A payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.

httpx

by projectdiscovery doticongodoticon

star image 2972 doticonMIT

httpx is a fast and multi-purpose HTTP toolkit allows to run multiple probers using retryablehttp library, it is designed to maintain the result reliability with increased threads.

Hack-Tools

by LasCC doticontypescriptdoticon

star image 2850 doticon

The all-in-one Red Team extension for Web Pentester 🛠

Top Authors in Testing

1

bahmutov

133 Libraries

star icon3334

2

PacktPublishing

51 Libraries

star icon756

3

cypress-io

43 Libraries

star icon46809

4

browserstack

41 Libraries

star icon676

5

LambdaTest

37 Libraries

star icon212

6

google

37 Libraries

star icon52919

7

osandadeshan

33 Libraries

star icon98

8

microsoft

29 Libraries

star icon16508

9

cucumber

26 Libraries

star icon22956

10

sebastianbergmann

19 Libraries

star icon24123

1

133 Libraries

star icon3334

2

51 Libraries

star icon756

3

43 Libraries

star icon46809

4

41 Libraries

star icon676

5

37 Libraries

star icon212

6

37 Libraries

star icon52919

7

33 Libraries

star icon98

8

29 Libraries

star icon16508

9

26 Libraries

star icon22956

10

19 Libraries

star icon24123

Trending Kits in Testing

The smtplib module will define an SMTP client session object which we can use for sending email to any machine connected to the internet with an ESMTP or SMTP listener daemon. 


We can use Python for sending an email in many ways, like an email with an attachment, an HTML/Markdown-formatted email message, or plain text. Many third-party libraries are available in the market, like EmailReplyParser for parsing the response from email threads, EmailMessage module in Python’s Standard Library, Mailgun-py, which is an official and actively maintained library, and Flanker which is a parsing and validation library. 


We have handpicked the top 15 Python Email Libraries in 2024 which fulfill all the developer requirements: 

GHunt

  • Is an offensive Google Framework that is designed to evolve effectively.  
  • Is fully asynchronous and uses CLI & modules.  
  • Will automatically use venvs to avoid dependency conflicts with other projects. 

mailinabox

  • Helps us in taking back control of our email by defining an easy-to-deploy, one-click SMTP+everything else server: a mail server in a box. 
  • Promotes innovation, privacy, and decentralization on the web. 
  • Has auditable, idempotent, and automated configuration. 

Mailpile

  • Is a fast web-mail client, modern, with user-friendly privacy and encryption features.  
  • Places emphasize providing an elegant user interface and a clean and pleasant user experience. 
  • Allows email to be organized with tags and lets us automatically configure tag incoming email depending on Bayesian classifiers or static rules. 

theHarvester

  • Is a simple yet powerful tool designed for use during the reconnaissance stage of a penetrated or a red team assessment test. 
  • Performs Open Source Intelligence (OSINT) by gathering help in determining a domain’s external threat landscape. 
  • Gathers emails, subdomains, URLs, names, and IPs with the help of multiple public resources. 

pyWhat

  • Will easily let you identify IP addresses, emails, and more. 
  • Helps in filtering outputs, exporting, and sorting according to your requirements. 
  • Supports filters like bug bounties and many more. 

sync-engine

  • Offers a RESTful API on top of a powerful email sync platform to make it easier to build apps on top of the email. 
  • The API service will provide a REST API to help interact with your data. 
  • The sync engine will automatically begin synchronizing your account with your current provider. 

yagmail

  • Is an SMTP/GMAIL client which aims to make sending emails the simplest and easiest task. 
  • With yagmail, sending emails to many people by offering a list of email strings rather than mentioning a single string is possible. 
  • Is a wrapper library on top of smtplib that is a standard library to send emails using Python. 

mailin

  • Is an SMTP server that listens to emails, parses them, and posts them in json format to the URL you choose.  
  • Checks incoming email’s spf, spam score, and dkim to tell you the language in which it is written.  
  • Can be used as a standalone application embedded inside a node application or directly from the command line. 

offlineimap

  • Is software that helps download your email mailbox or mailboxes as local Maildirs.  
  • OfflineIMAP will synchronize both sides using IMAP.  
  • Allows you to read your email offline without requiring your mail reader to support your IMAP operations. 

gmail

  • Is a Pythonic interface for Google’s Gmail with all the necessary tools.  
  • Will search, archive, delete, read, and send multipart emails, manage labels, and mark as read/unread emails. 
  • Connects with live Gmail for accessing real-time data. 

flanker

  • Is an open source parsing library in Python which contains an address and a MIME parsing library.  
  • Both can parse addresses, validate them, and convert headers to Unicode, which detects and preserves encodings when possible. 
  • Stores the message in a single string, tracks changes, and returns unchanged parts during serialization. 

inbox.py

  • Is an asynchronous simplest SMTP server.  
  • Can handle one instance of over one thousand emails per second.  
  • Is a library for managing email inboxes that provides an API for creating, deleting, reading, and retrieving emails. 

django-anymail

  • Let's send and receive an email in Django with your choice of transactional Email Service Provider (ESPs). 
  • Includes integration to each ESP’s sending APIs into Django’s built-in email package, simplified inline images from HTML email, and ‘Batch Transactional’ sends with your ESP’s merging and templating features.  
  • Maintains compatibility with all Django versions and is extensively tested on all Python versions which Django supports. 

python-o365

  • Aims in making interact with Office 365 and Microsoft Graph in a Pythonic and easy way. 
  • Helps with access to Calendar, OneDrive, Email, and Contacts. 
  • Provides automatic handling between local and server datetimes. 

SimplyEmail

  • Is an email recon that is easy and quick using the framework built on.  
  • Uses built-in Parsers for the rawest results.  
  • Multiprocessing Queue for modules and Results Queue for easy Email data handling. 

FAQ:  

1. What is the email module used for in Python programming?  

The Python 'email' module can create, send, receive, and manage email messages. It helps you with email messages, different email types, and functionalities. You can use the 'email' module to write and send plain text and HTML emails. It also lets you handle headers and add attachments.  


Key Features:  

  • Message Composition: It helps create and format email messages with various MIME types. It includes plain text, attachments, and HTML.  
  • Header Manipulation: It provides methods to manipulate and add headers to email messages. Headers are crucial to route and identify emails correctly.  
  • MIME types: It supports different MIME types. It allows you to send emails with rich content like video, audio, and images.  
  • SMTP Integration: You can use the 'smtplib' module with the 'email' module to send emails over an SMTP server.  
  • Message Parsing: You can use the module to parse incoming email messages. It can be helpful when you need to extract information from received emails.  
  • Internationalization: It supports international character encodings. It provides features to send emails in various languages and character sets.  
  • Attachment Handling: You can add files to your email using the 'email' module. This is useful for sending documents, images, or other files along with your emails.  

  

2. How does the listener daemon work in Python's email libraries?  

Python's email libraries do not include a dedicated concept for listening to demons. But you may want to make a program that listens for emails using 'imaplib' and 'email.  


Here is how it works:  

Checking for New Emails:   

The program connects to the IMAP server using 'imaplib.' To start, log in using the right login information. Then, choose the mailbox you want and look for new or unread emails. Once you find new emails, you can use the 'email' module to parse and process the content of these emails.  

Internet Message Access Protocol:  

IMAP is a protocol to access and manage email messages stored on a mail server. POP3 usually downloads emails to the device and deletes them from the server. It allows you to manage emails on the server itself. Python's 'imaplib' module provides a way to interact with IMAP servers.  

Listener Setup:  

To create an email listener in Python, you typically use the 'imaplib' module to connect to an IMAP server. It periodically checks for new emails in a specified mailbox (folder) on the server.  

  

3. What does the smtplib module include in its features?  

The 'smtplib' module in Python provides a way to send emails using SMTP. SMTP server uses it to deliver email messages. It offers several features and functionalities that facilitate sending emails programmatically.  


Here are the key features included within the 'smtplib' module:  

SMTP Connection Management:  

  • SMTP (host, port): Using the constructor to create an SMTP instance. It provides the hostname and port of the server.  
  • Login (user, password): Authenticates with the server using the specified username and password.  
  • starttls(): Initiates a secure TLS connection with the server.  


Debugging and Logging:  

  • has_extn(name): Checks if the server supports a specific extension.  
  • set_debugLevel(level): Sets the debug output level for the SMTP connection.  


Email Sending:  

  • quit(): Closes the SMTP connection.  
  • sendmail (from_addr, to_addrs, msg): The function sendmail sends an email. It takes three arguments: from_addr, to_addrs, and msg.  
  • send_message(msg): Sends an email message object directly using the SMTP connection.  


Exception Handling:   

  • SMTPConnectError: Raised if the connection to the SMTP server fails.  
  • SMTPException: Base class for exceptions raised by the 'smtplib' module.  
  • SMTPAuthenticationError: Raised if authentication with the SMTP server fails.  


Authentication and Security:  

  • starttls(): Initiates a TLS/SSL encrypted session to secure communication.  
  • login (user, password): Enter your username and password to log in. This will allow you to authenticate with the SMTP server.  

  

4. How do Multipurpose Internet Mail Extensions (MIME) help with mail transmission?  

MIME helps emails send more than just plain text by including multimedia content. It is important for mail transmission. Email messages follow an Internet standard. This standard allows for character encodings, attachments, and content types. It enhances the capabilities of email messages. It makes them more versatile and capable of handling rich content.  


Here is how MIME helps with mail transmission:  

  • Support for Non-Text Content  
  • Attachments  
  • Content Type Identification  
  • Content-Encoding  
  • Compatibility  
  • Header Information  
  • Message Structure  
  • Multi-Part Messages  
  • Inline Images and Styling  


MIME improves email messages by consistently handling various content types. Emails can carry multimedia attachments, styled HTML content, and other non-text elements. It makes email communication more versatile and expensive.  

  

5. What should you consider when selecting an email service provider for Python apps?  

It would help to consider many things when picking an email service for Python apps. Make sure your chosen provider meets your application's needs and requirements.  


Here are some key considerations:  

  • API Documentation and Support  
  • Email Deliverability  
  • Ease of Integration  
  • Email Sending Limits  
  • Authentication and Security  
  • Scalability  
  • Template Support  
  • Cost and Pricing Model  
  • Analytics and Tracking  
  • Geographical Coverage  
  • Vendor Lock-in  
  • Compliance and Regulations  
  • Customization and Branding  
  • Service Uptime and Reliability  

  

6. How can I create an SMTP client session object to send emails through a server?  

To create an SMTP client session object to send emails through a server, you can use the 'smtplib' module. Here are the steps to make an SMTP client session and send emails using the module: 

  • Import the 'smtplib' module: Import the 'stmplib' module. It provides methods and classes to send emails using the SMTP protocol.  
  • Create an SMTP connection: Use the 'SMTP' class to show a connection with the server. You should provide the hostname and port number of the SMTP server. The standard ports are 25 (unencrypted) and 587 (encrypted with STARTTLS). If you use SSL/TLS, you might need to use a different port.  
  • Start TLS Encryption: Use the 'starttls()' method to make a secure connection. Use it if your email server has TLS encryption.  
  • Login to the server: Authenticate with the SMTP server using your email credentials. Replace ‘your_email@example.com' and 'your_password' with your actual email and password.  
  • Create an Email message: Use the 'email' module to create an email message. This could include setting the sender, subject, recipients, and message body. You can also attach files and format the email content.  
  • Send the email: Use the 'sendmail()' method to send the email. Provide the sender's email address, the message content, and the recipient's email address.  
  • Quit the SMTP connection: To end the SMTP connection, close it after sending emails.  

You can use these to implement different types of automation, including web scraping, data extraction and manipulation, and workflow management.

 

Python is the most widely used programming language for automation. No matter what kind of task you want to automate in Python, there's a library for it. The most popular Python Automation library is Selenium WebDriver. It is one of the most widely used tools for automating browsers on the internet today. Selenium allows users to access their browsers through code (Python or Java). Other Python automation libraries can be used to test web applications or perform tasks like form filling/submission without requiring human interaction. The biggest advantage of using Python libraries is that they do not require any installation because they are written entirely in Python. So, all you need is your favorite text editor (like Sublime Text).

 

We have handpicked the top and trending open-source Python automation libraries for your next application development project:

 

Ansible:

  • Used in DevOps, Ansible, Docker applications, etc.
  • Makes the deployment and maintenance of applications and systems easier.
  • Helps automate tasks like code deployment, network configuration, cloud management, etc.

Selenium: 

  • Used in Testing, Functional Testing, Selenium applications, etc.
  • Offers a variety of tools and libraries enabling web browser automation.
  • Provides an infrastructure for the W3C WebDriver specifications.

Prefect:

  • Used in Automation, BPM applications, etc.
  • Helps ensure that workflows execute properly.
  • Offers one of the easiest ways to coordinate your dataflow.

Tpot:

  • Used in Artificial Intelligence, Machine Learning applications, etc.
  • Optimizes machine learning pipelines using genetic programming.
  • Helps automate the most tedious part of machine learning.

Robotframework:

  • Used in Automation, Selenium applications, etc.
  • Offers a generic automation framework.
  • Useful for acceptance testing and RPA.

Playwright-python:

  • Used in Testing applications, etc.
  • It’s the Python version of the Playwright testing and automation library.
  • Delivers capable, reliable, and fast automation.

Pyautogui:

  • Used to control the mouse and keyboard programmatically.
  • It’s a cross-platform GUI automation Python module.
  • Supports Python 2 and 3 on Windows, macOS, and Linux operating systems.

Pywinauto:

  • Used to automate the Microsoft Windows GUI.
  • Allows sending mouse and keyboard actions to windows dialogs and controls.
  • Also, supports more complex actions like getting text data.

SeleniumBase:

  • Used in Testing, Functional Testing, Selenium applications, etc.
  • Offers a Python framework for browser automation and E2E UI testing.
  • Includes Test Case Management Software with Markdown technology.

Tox:

  • Used in DevOps, Continous Integration, Jenkin applications, etc.
  • It’s a generic virtual environment management and test command line tool.
  • Helps automate and standardize testing in Python.

Automagica:

  • Used in Automation, Docker applications, etc.
  • Provides AI-powered Smart Robotic Process Automation.
  • Helps automate a variety of tasks and processes.

Selenium-python-helium:

  • Used in Testing, Functional Testing, Selenium applications, etc.
  • Makes it easier to use Selenium-python for web automation.
  • Offers a high-level API for tasks such as Web driver management, iFrames, Window management, etc.

PHP is a popular open-source programming language that is widely used for developing web applications. It helps developers to create dynamic content for websites and mobile apps. PHP Testing is one of the most important parts of PHP development. It allows you to test your code, check the performance of your product, and find bugs. The best PHP testing tools allow developers to run tests in a simple way, from unit tests to functional testing. To make your life easier, we’ve prepared a list of 7 best PHP Testing Open Source libraries in 2022 in our kit, laravel-generator - CRUD Laravel Generator; php-quickcheck - generative testing for PHP; phpunit-skeleton-generator - generate skeleton test classes from production code classes.

Python is one of the most popular programming languages in the world. It has been used for websites, desktop applications, and scientific computing. Testing in Python is a huge topic and can come with a lot of complexity, but it doesn’t need to be hard. I hope this article will help you find the right library or framework for your needs so that you can focus on getting results instead of reinventing the wheel. The Python testing library is rich with features and provides everything that one would expect from a quality testing framework. In this kit, we will look at the best Python Testing open source libraries. robotframework - Generic automation framework for acceptance testing and RPA; pynguin - PYthoN General UnIt Test geNerator is a test generation tool; oj - Tools for various online judges.

Python encryption libraries provide base chunks of pre-written code that can be repurposed to develop a unique encryption-decryption system.

These libraries offer a long list of primitives a developer can build upon, choosing from cipher-decipher algorithms like AES, RSA, DES, etc. It allows developers to deal with sideline attacks better. Open-source Python libraries, not being a part of the standard package, can be installed using the PIP function. Python encryptions systems are not web-exclusive; the language allows a developer the flexibility of cross-platform use, unlike other popular coding languages like, say, PHP.


The list below summarizes our top open-source python libraries, consisting of ready-to-incorporate code components for designing encrypted security. Certbot acquires SSL certificates from the open-source certificate authority, Let's Encrypt. It also gives the developer the option to automatically enable HTTPS protocol and to act as a client for certificate authorities running on the ACME protocol. Mailpile, a web-mail client, focuses on the overall experience by providing a clean user interface. While being a web-based interface, it also provides an API and a command-line interface for developers. Ciphey employs artificial intelligence to assess the type of encryption and decipher the input text fast. It is minimalistic and precise.

certbot:  

  • It is a command-line tool for managing SSL/TLS certificates.   
  • It is often used in conjunction with Python web servers, such as Nginx or Apache.   
  • It enables secure communication over HTTPS.  

Ciphey:  

  • Ciphey is a Python library used in Institutions, Education, Security, and Cryptography applications.  
  • It is a tool designed for automatic decryption of ciphers and codes.  
  • It aims to simplify the process of deciphering encrypted messages. This detects the encryption method and provides the decrypted result.  

Mailpile:  

  • Mailpile helps in Institutions, Learning, Administration, Public Services, Messaging, and Email applications.  
  • It provides an interface for managing and encrypting emails.  
  • Its primary user interface is web-based. It also offers a basic command-line interface and an API for developers.

byob:  

  • BYOB in Python generally refers to "Bring Your Own Bytes" or "Bring Your Own Key," depending on the context.  
  • It allows users to provide their own cryptographic keys. Rather than relying on default or generated keys.  
  • BYOB enables customization to meet these needs.

cryptography:  

  • It is a Python library used in Security, Cryptography applications.  
  • It exposes cryptographic primitives and recipes to Python developers.  
  • It ensures data confidentiality, integrity, and authenticity.

acme-tiny:  

  • acme-tiny is a Python encryption library.  
  • It helps with Security, Encryption, and Docker applications.  
  • You can install using 'pip install acme-tiny' or download it from GitHub, PyPI. It is used as a tiny script to issue and renew TLS certs from Let's Encrypt.

yadm:  

  • yadm is a Python library used in Devops, Configuration Management applications.  
  • yadm is a tool for managing dotfiles.  
  • It helps ensure consistency and ease of setup by keeping track of configurations.

ssh-audit:  

  • ssh-audit is a Python library.  
  • It is a tool used to audit the security configurations of SSH servers.  
  • It identifies potential vulnerabilities and weaknesses in the SSH configuration.

PyBitmessage:  

  • PyBitmessage is a Python library used in Telecommunications, Media, Telecom, Networking applications.  
  • It is a P2P communication protocol used to send encrypted messages to another person.  
  • It aims to hide metadata from passive eavesdroppers.

RsaCtfTool:  

  • RsaCtfTool is a Python library used in Security and Cryptography applications.  
  • It is a Python-based tool designed for solving RSA Capture the Flag (CTF) challenges.  
  • It plays a crucial role in CTF competitions. Its participants often encounter RSA-related problems. 

pycrypto:  

  • PyCrypto is important for several reasons in the context of encryption.  
  • PyCrypto supports various encryption algorithms, hashing functions, and random number generators.  
  • PyCrypto facilitates interoperability by supporting used cryptographic standards.

EQGRP_Lost_in_Translation:  

  • EQGRP_Lost_in_Translation is a Python library.   
  • It helps in Programming Style applications.  
  • It decrypts content of odd.tar.xz.gpg, swift.tar.xz.gpg and windows.tar.xz.gpg.

asyncssh:  

  • asyncssh is a Python library that provides an asynchronous framework for SSH communication.  
  • SSH relies on encryption algorithms to secure data transmission.  
  • asyncssh supports various encryption algorithms, providing a secure means of communication over networks.

Cloakify:  

  • Cloakify is a Python library used in Testing and Security Testing applications.  
  • It is a tool designed to obfuscate or "cloak" data in various formats, making it less conspicuous.  
  • This is useful for hiding sensitive information in plain sight.

demiguise:  

  • demiguise is a Python encryption library.  
  • It helps in Security, Encryption applications.  
  • It is an HTA encryption tool for RedTeams.

Crypton:  

  • Crypton is a Python library used in Security, Cryptography applications.  
  • Crypton is an educational library to learn and practice Offensive and Defensive Cryptography.  
  • It is an explanation of all the existing vulnerabilities on various Systems.

xortool:  

  • It is a tool used for analyzing and breaking simple XOR-based encryption.  
  • XOR is a bitwise operation that helps in encryption.  
  • It is a tool used to analyze multi-byte xor cipher.

tf-encrypted:  

  • tf-encrypted is a Python library that extends TensorFlow.   
  • TansorFlow extends to enable privacy-preserving machine learning using encrypted data.  
  • It aims to make privacy-preserving machine learning available, without requiring expertise in cryptography.

GlobaLeaks:  

  • GlobaLeaks is a Python library used in Security, Encryption applications.  
  • It is an open-source whistleblowing framework designed for secure and anonymous communication.  
  • It provides tools for organizations to set up their own secure whistleblowing platforms.

server:  

  • servers enable secure connections, like HTTPS. HTTPs are vital for protecting sensitive information during data transmission over networks.  
  • It ensures the confidentiality and integrity of data by handling encryption keys.  
  • It provides a central point for managing cryptographic operations.

ssl_logger:  

  • ssl_logger is a Python library used in Security, TLS applications.  
  • It helps in identifying potential vulnerabilities, debugging handshake problems, and ensuring secure communication.  
  • It Decrypts and logs a process's SSL traffic.

simp_le:  

  • simp_le is a Python library that helps with encryption.  
  • It Encrypts Client. It has no bugs and has no vulnerabilities.  
  • simp_le can download it from GitHub.

featherduster:  

  • FeatherDuster is a Python library designed for educational purposes.  
  • It is to help users understand various aspects of cryptography.   
  • It helps in penetration testing scenarios. It assesses the security of cryptographic components in apps and systems.

hawkpost:  

  • featherduster is a Python library used in Security, Cryptography applications.  
  • It is an online service that allows users to create encrypted messages with a sharable link.  
  • Cryptanalib is the moving part behind FeatherDuster, and helps with FeatherDuster.

tfc:  

  • tfc is a Python library used in Networking, Router applications.  
  • It helps developers install privacy-preserving machine-learning techniques.   
  • It is a Tinfoil Chat - Onion-routed, endpoint secure messaging system.

pyopenssl:  

  • pyOpenSSL is a Python wrapper around the OpenSSL library.   
  • It provides support for secure sockets (SSL/TLS) and cryptographic functions.  
  • It allows Python apps to establish secure connections over the internet. It uses the SSL/TLS protocol.

nucypher:  

  • NuCypher is provides a decentralized key management system.  
  • It allows for proxy re-encryption, enabling data sharing without exposing sensitive keys.  
  • This is valuable for apps requiring secure and decentralized access control in blockchain. 

RAASNet:  

  • RAASNet is a Python Encryption library.  
  • It helps with Testing and Security Testing applications.  
  • It is an Open-Source Ransomware as a Service for Linux, MacOS and Windows.

dnsrobocert:  

  • dnsrobocert is a Python library used in Security, TLS, Docker applications.  
  • It obtains SSL/TLS certificates through an automated process.   
  • It integrates with DNS challenges for verification.

Xeexe-TopAntivirusEvasion:  

  • Xeexe-TopAntivirusEvasion is a Python library used in Security, Firewall applications.  
  • It is an Undetectable & Xor encrypting with custom KEY.  
  • It bypasses Top Antivirus like BitDefender, Malwarebytes, Avast, ESET-NOD32, AVG, & Add ICON and MANIFEST to excitable.

Decentralized-Internet:  

  • A decentralized internet can enhance security in Python encryption libraries. It reduces the reliance on central authorities.  
  • This enhances the robustness of encryption implementations.  
  • It can contribute to user privacy by minimizing the collection of sensitive data.

PacketWhisper:  

  • PacketWhisper is a Python library used in Testing, Security Testing applications.  
  • PacketWhisper helps to address specific needs or vulnerabilities in network communication.  
  • It could be valuable for scenarios where secure packet transmission is crucial.

python-paillier:  

  • Python-Paillier is a library that implements the Paillier cryptosystem in Python.  
  • In machine learning, Python-Paillier applies to build privacy-preserving models.  
  • Python-Paillier, being an open-source library, encourages collaboration and contributions from the community.

covertutils:  

  • covertutils is a Python encryption library   
  • It helps with Testing and Security Testing applications.  
  • It is a framework for Backdoor development.

decrypt:  

  • It is crucial for retrieving original data from encrypted content.  
  • It ensures data confidentiality. It allows authorized users to access and understand the information.  
  • It is essential in scenarios were sensitive data needs transmission or storage.

nufhe:  

  • nufhe is a Python library used in Security, Encryption applications.  
  • It is a NuCypher homomorphic encryption (NuFHE) library implemented in Python.  
  • You can install using 'pip install nufhe' or download it from GitHub, PyPI.  

rsa-wiener-attack:  

  • rsa-wiener-attack is a Python library used in Security, Cryptography applications.  
  • A Python version of the Wiener attack targeting the RSA public-key encryption system.  
  • It targets cases where the private exponent is small. It allows an attacker to factorize the modulus.

an2linuxserver:  

  • an2linuxserver is a Python encryption library.  
  • It helps in Security, Encryption applications.  
  • It is a Sync Android notification encrypted to a Linux desktop.

python-rsa:  

  • It provides functionality for working with RSA encryption, a used public-key cryptosystem.  
  • python-rsa helps ensure the confidentiality and integrity of data during transmission.  
  • It provides tools for managing RSA keys, including key generation, serialization, and storage.

NXcrypt:  

  • NXcrypt is a Python library used in Artificial Intelligence, Machine Learning applications.  
  • It is a polymorphic 'python backdoors' crypter written in python by Hadi Mene (h4d3s).  
  • NXcrypt can inject malicious Python files into a normal file using a multi-threading system.

gpgsync:  

  • GPG in Python, it's crucial for key management, encryption, and digital signatures.  
  • GPG provides a way to secure communication and data integrity.   
  • It can enhance the security of your apps. It helps in dealing with sensitive information.

ShellcodeWrapper:  

  • ShellcodeWrapper is a Python encryption library, used in Security and Hacking applications.  
  • Wrappers help organize code by encapsulating related functionalities.  
  • Wrappers often serve as a convenient interface or encapsulation for underlying functionality.

nfreezer:  

  • nfreezer is a Python library used in Security, Encryption applications.  
  • nFreezer (for encrypted freezer) is an encrypted-at-rest backup tool.  
  • It helps in the cases with untrusted destination servers.

oscrypto:  

  • oscrypto is a Python library that provides a high-level interface to cryptographic operations.  
  • It is built on top of the cryptography library. It aims to simplify the use of cryptographic functions in Python.  
  • Its ability to offer a consistent API for various cryptographic tasks.

encrypted-dns:  

  • Encrypted DNS (Domain Name System) in Python encryption libraries.  
  • It is crucial for enhancing the security and privacy of internet communication.  
  • It integrated with encrypted DNS. It ensures the process of resolving domain names to IP addresses is secure.

simple-crypt:  

  • It provides a simple interface for symmetric encryption and decryption.  
  • It can serve as an educational tool. This tool helps individuals who are learning about encryption.  
  • It allows developers to install basic encryption. It enables them to focus on other aspects of their projects.

privy:  

  • privy is a Python encryption library.  
  • It helps in Security, Encryption applications.  
  • It is an easy, fast lib to password-protect your data. 

FAQ 

1.What is encryption?  

It is the process of converting plaintext data into a secure and unreadable form. It is also known as ciphertext, to protect sensitive information.  

 

2.Why should I use encryption in Python?  

Encryption helps secure data during transmission or storage, preventing unauthorized access. It's crucial for protecting sensitive information like passwords, personal data, or confidential files.  

 

3.Which encryption libraries to use in Python?  

Popular encryption libraries in Python include cryptography, PyCryptodome, and cryptography. This library provides high-level cryptographic primitives.  

 

4.How do I install a Python encryption library?  

You can install most libraries using a package manager like pip. For example, to install the cryptography library, run pip install cryptography.  

 

5.What types of encryption algorithms are supported?  

Python encryption libraries often support various algorithms. It includes AES (Advanced Encryption Standard), RSA (Rivest-Shamir-Adleman), and others. Check the documentation for the specific library to see which algorithms are supported.

Open Source Intelligence has played a pivotal role in key events like tracing Covid-19 origins, MH17 downing, the Boston Marathon bombing, and the Myanmar refugee crisis. Approximately 500 million tweets are published every day, totaling over 200 billion posts in a year. Facebook users upload 350 million photos per day. YouTube users add nearly 720,000 hours of new video every day. Almost all devices are online today in the connected world.

While monitoring messages was exclusive to intelligence agencies, the tons of information available in the public realm today has made it possible for general and security enthusiasts to look for insights that might not have been possible earlier. The U.S. Department of State defines OSINT as "intelligence that is produced from publicly available information and is collected, exploited, and disseminated promptly to an appropriate audience to address a specific intelligence requirement."

Designed correctly, OSINT can reduce risk across a variety of common risks such as weather conditions, disease outbreaks, corporate risk management, data privacy, reputation management, in addition to higher-order tasks like national security and cybersecurity. Do not construe this as legal advice, promotion, or authorization to indulge in any activity whatsoever.

OSINT Framework

The OSINT framework enables gathering information from free tools or resources. The below open source libraries introduce and enable gathering information based on the OSINT Framework.

Target Reconnaissance

Recon-ng is a full-featured reconnaissance framework designed with the goal of providing a powerful environment to conduct open source web-based reconnaissance quickly and thoroughly.

Information Collection

theHarvester and similar tools gather emails, names, subdomains, IPs and URLs using multiple public data sources.

Track Online Assets

Shodan and Amass enable researchers to see the exposed assets.

Google Search

Google dorks provides information through the usage of operators, which are otherwise difficult to extract using simple searches.

Accessibility Testing is a testing technique to identify the accessibility issues in the application for disabled and elderly users. It checks if the application is usable by people with all abilities and disabilities. It is also known as Accessibility Audit or Accessibility Review. The goal of accessibility testing is to make sure that the persons with disabilities are able to use the application without any difficulty, i.e., they should be able to access all functionalities and information provided by the Application In this list, we will discuss 6 best open-source Java libraries for Accessibility Testing: clean-code-javascript - Clean Code concepts adapted for JavaScript; Tanaguru - Automated accessibility testing tool, with emphasis on reliablity and automation; axe-android - WCAG Accessibility compliance library for Android Applications.

Accessibility testing is crucial to ensure a product is usable by the majority of its target audience. The disabled community represents around 15% of the U.S population, but it is still often overlooked in design and testing efforts. Plus, accessibility testing is not just about people with disabilities, it also aims at making products usable by older people or users with temporary disabilities (e.g., when using a phone with one hand). In this kit, we will review the best JavaScript Accessibility Testing libraries available pa11y - Pa11y is your automated accessibility testing pal; spearmint - accessibilityfirst GUI for generating clean; quail - Accessibility testing in the browser and on the server.

Accessibility testing is a key part of the software development lifecycle. It helps to ensure that your application provides a pleasant experience for users with disabilities. There are many ways to perform accessibility testing, such as visual inspection and assistive technology testing. It is a process of ensuring that software and web applications are accessible to a wide variety of users, including those with disabilities. Accessibility testing can be time-consuming and expensive. To solve this problem, we have created a list of the best open source software for accessibility testing. This kit contains 11 Python libraries that provide a wide range of features and allow you to test multiple platforms including BeeF-Over-Wan - Browser Exploitation Framework; page-lab - PageLab enables web performance, accessibility, SEO, etc testing; Project_CodeNet - support contributions.

Accessibility testing is a testing technique designed to uncover in an accessible manner any potential issues associated with the application's ability to be used by people with different abilities and disabilities. Accessibility testing involves looking at the application from many different angles, including those of assistive technology, internationalization, localization, aging, and cognitive impairment. The goal of accessibility testing is to ensure that all users can access all functionalities and information provided by the application. Following are the 17 best Go libraries A11yTesting -| Material für den Vortrag "Accessibility Testing goes Mainstream; Vault CI Service - Dockerized service for GitLab CI that provides Hashicorp Vault; gorm-expect - Testing framework for easily testing GORMbased data access layers.

Accessibility testing (AT), also known as Accessibility Audit or Accessibility Review, is a software-testing technique used by organizations that develop applications to ensure that the applications are usable by persons with disabilities. The goal of AT is to make sure that persons with disabilities are able to use the application without any difficulty, i.e., they should be able to access all functionalities and information provided by the application. We have created a list of the 6 best open sources Ruby libraries for accessibility testing. This kit contains 6 libraries including stripe-ruby-mock - A mocking library for testing stripe ruby; axe-core-gems - Ruby integration for axecore, the accessibility testing engine; ra11y - Rubybased automated accessibility testing.

Accessibility testing's goal is to make sure that persons with disabilities are able to use an application as easily as possible, i.e., they should be able to access all functionalities and information provided by the application. Accessibility testing is a technique used to identify issues in an application that makes it difficult for disabled and elderly users to use. The goal of accessibility testing is to ensure that disabled users can access all functionalities and information provided by the application without issue. Let's see the best in a class of accessibility libraries for PHP here phoronix-test-suite - Phoronix Test Suite opensource, crossplatform automated testing; centipede - The Simplest automated testing tool on Earth; frontend-test-suite - give love to automated testing.

Accessibility testing is a technique to identify accessibility issues in an application. It checks whether the application is usable by people with different types of disabilities, especially visual impairment and motor disability. The goal of such a test is to make sure that people with disabilities are able to use the application without any difficulty; i.e., they are able to access all functionalities and information provided by the application. Accessibility Testing is a testing technique to ensure that the application under test is usable by people with disabilities like hearing, color blindness, old age and other disabilities. Following are the 17 best C# libraieries MyTested.AspNetCore.Mvc - Fluent testing library for ASP.NET Core MVC; axe-windows - Automated accessibility testing engine for Windows applications; axe-selenium-csharp - using aXe for web accessibility testing.

Java Assertion is a mechanism to indicate that the programmer thinks that something unexpected has happened. It is like a sanity check in a code and should be used to ensure that the code works as expected. Assertion statements are available since Java 1.4 and can be enabled or disabled as per requirement. Assertions should not be used for user input validation, the normal flow of program execution, or any exception handling. Java Assertion Libraries is one of the most popular open-source libraries for assertion in Java. These libraries are useful to check whether the actual result and expected result are equal or not. Let's take a look at some of the most popular and useful assertion open source libraries in 2022 truth - Fluent assertions for Java and Android; assertj-core - library providing easy to use rich typed assertions; ArchUnit - Java architecture test library.

The assertion is a very important concept in software development. It allows you to check the conditions and make sure that everything is working properly. A very basic example is when you try to divide with 0, the program will throw an error because it's not possible. When you want to start testing your code, assertions can be very useful to ensure that it works as expected. The good thing about assertions is that it does nothing when the condition is met, so it won't affect the performance of your application. There are several libraries for Python which implement assertions and we have listed the best ones here. sure - idiomatic assertion toolkit with humanfriendly failure messages; assertpy - Simple assertion library for unit testing; expects - extensible TDD/BDD assertion library.

PHP asserts are used to make sure the code is working as expected. They are used to ensure that certain conditions are met and that the code is doing what it's supposed to be doing. An assertion is a statement in code that evaluates whether its condition is true or false. If it returns true, the program continues its execution, or else it throws an error. PHP Unit Testing consists of Assertions and the first step to doing unit testing is to write assertions for your code. Assertions are used for Test-Driven Development (TDD) and Behavior Driven Development (BDD). In this kit, we will go through the top 7 best PHP assertion libraries that you can use to write assertions for your code assert - validate method input/output with nice error messages; phpunit-snapshot-assertions - A way to test without writing actual test cases; SwaggerAssertions - API requests and responses match with your swagger definition.

Ruby is an interpreted, high-level, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro Matsumoto in Japan. According to the creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. It also has a dynamic type system and automatic memory management. An assertion is one of the most important things in software development. Assertions are used to check for conditions that should never occur during normal execution. If an assertion fails, it indicates a bug, and the program should be terminated immediately. Here are 12 Ruby Assertion Open Source libraries that we recommend konacha - Rails application's JavaScript with the mocha test framework; Wrong - provides a general assert method; power_assert - Power Assert for Ruby.

Assertions help us make sure that the code does what it is intended to do. It is an essential part of programming to develop robust code. They are a set of statements that take action when a condition is not as expected. The ideal assertion library will have expressive assert functions, fluent assertions, and readable error messages. The assertion library should be simple and work on any Go project regardless of the framework being used. Go’s testing package is simple and elegant. There is no need to use a third party library to perform automated testing. Let’s see the 10 best open-source Go Assertion Libraries in 2022: testify - common assertions and mocks that plays nicely; testza - Full-featured test framework for Go! Assertions, fuzzing, input testing, output capturing, and much; gcassert - Assert your Go code is inlined and boundscheck eliminated.

C# Assertion is a construct that signals to the calling code that an unexpected event has taken place. It allows programmers to build in sanity checks into their programs, which can then be used to detect when the program is behaving in an unexpected fashion. Assertion libraries are an essential part of a tester's arsenal. They help us to check if our assumptions about the code we write/test are true. They facilitate evaluating the expected and actual results that are intended to be equal. Here are 7 best C# Assertion Open Source libraries that we recommend, shouldly - Should testing for .NET the way Asserting Should be; Verify - snapshot too; fido2-net-lib - NET library for FIDO2 / WebAuthn Attestation and Assertion.

The C++ Assertion library is a collection of macros for performing assertions and compile-time checks. It is a very useful tool for finding bugs in code during the early stages of development. If you want to use an Assertion library for C++, you have to make a decision on which one to use. There are many different libraries with different features. Some of them are quite old and were already used in C++98, others are more modern and only support C++11 or even later language versions. Some libraries are very small and easy to integrate into any project, others require some additional work. In this kit we will give you an overview of the most important assertion libraries for C++ debug_assert - Simple, flexible and modular assertion macro; PPK_ASSERT - a cross platform dropin & selfcontained C assertion library; asserts - The most overengineered C assertion library.

Trending Discussions on Testing

Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro

Constant FILTER_SANITIZE_STRING is deprecated

Why is it faster to compare strings that match than strings that do not?

Invalid options object. Dev Server has been initialized using an options object that does not match the API schema

The unauthenticated git protocol on port 9418 is no longer supported

Consider using the "jsdom" test environment

Installing scipy and scikit-learn on apple m1

TypeError: load() missing 1 required positional argument: 'Loader' in Google Colab

Switch' is not exported from 'react-router-dom'

IntelliJ - Git is not installed: Cannot identify version of git executable: no response

QUESTION

Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro

Asked 2022-Apr-04 at 18:41

I've got a project that is working fine in windows os but when I switched my laptop and opened an existing project in MacBook Pro M1. I'm unable to run an existing android project in MacBook pro M1. first I was getting

Execution failed for task ':app:kaptDevDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution > java.lang.reflect.InvocationTargetException (no error message)

this error was due to the Room database I applied a fix that was adding below library before Room database and also changed my JDK location from file structure from JRE to JDK.

kapt "org.xerial:sqlite-jdbc:3.34.0"

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6

after that now I'm getting an issue which is Unknown host CPU architecture: arm64

there is an SDK in my project that is using this below line.

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16

App Gradle

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23

[CXX1405] error when building with ndkBuild using /Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/Android.mk: Build command failed. Error while executing process /Users/mac/Library/Android/sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/Android.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/build/intermediates/cxx/Debug/4k4s2lc6/obj NDK_LIBS_OUT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/build/intermediates/cxx/Debug/4k4s2lc6/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n} ERROR: Unknown host CPU architecture: arm64

which is causing this issue and whenever I comment on this line

path 'Android.mk'

it starts working fine, is there any way around which will help me run this project with this piece of code without getting this NDK issue?

Update - It seems that Room got fixed in the latest updates, Therefore you may consider updating Room to latest version (2.3.0-alpha01 / 2.4.0-alpha03 or above)

GitHub Issue Tracker

ANSWER

Answered 2022-Apr-04 at 18:41

To solve this on a Apple Silicon M1 I found three options

A

Use NDK 24

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23android {
24    ndkVersion "24.0.8215888"
25    ...
26}
27

You can install it with

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23android {
24    ndkVersion "24.0.8215888"
25    ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28

or

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23android {
24    ndkVersion "24.0.8215888"
25    ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29

Depending what where sdkmanager is located enter image description here

B

Change your ndk-build to use Rosetta x86. Search for your installed ndk with

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23android {
24    ndkVersion "24.0.8215888"
25    ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30

eg

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23android {
24    ndkVersion "24.0.8215888"
25    ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
31

and change

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23android {
24    ndkVersion "24.0.8215888"
25    ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
31DIR="$(cd "$(dirname "$0")" && pwd)"
32$DIR/build/ndk-build "$@"
33

to

1   //Room components
2    kapt "org.xerial:sqlite-jdbc:3.34.0"
3    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5    androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7    externalNativeBuild {
8        ndkBuild {
9           path 'Android.mk'
10        }
11    }
12    ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17        cmake {
18            path "src/main/cpp/CMakeLists.txt"
19            version "3.18.1"
20            //version "3.10.2"
21        }
22    }
23android {
24    ndkVersion "24.0.8215888"
25    ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
31DIR="$(cd "$(dirname "$0")" && pwd)"
32$DIR/build/ndk-build "$@"
33DIR="$(cd "$(dirname "$0")" && pwd)"
34arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
35

enter image description here

C

convert your ndk-build into a cmake build

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

QUESTION

Constant FILTER_SANITIZE_STRING is deprecated

Asked 2022-Mar-30 at 13:01

I have installed PHP 8.1 and I started testing my old project. I have used the filter FILTER_SANITIZE_STRING like so:

1$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
2

Now I get this error:

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated

The same happens when I use FILTER_SANITIZE_STRIPPED:

Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated

What can I replace it with?

ANSWER

Answered 2022-Jan-15 at 14:59

This was a filter of dubious purpose. It's difficult to say what it was meant to accomplish exactly or when it should be used. It was also confused with the default string filter, due to its name, when in reality the default string filter is called FILTER_UNSAFE_RAW. The PHP community decided that the usage of this filter should not be supported anymore.

The behaviour of this filter was very unintuitive. It removed everything between < and the end of the string or until the next >. It also removed all NUL bytes. Finally, it encoded ' and " into their HTML entities.

If you want to replace it, you have a couple of options:

  1. Use the default string filter FILTER_UNSAFE_RAW that doesn't do any filtering. This should be used if you had no idea about the behaviour of FILTER_SANITIZE_STRING and you just want to use a default filter that will give you the string value.

  2. If you used this filter to protect against XSS vulnerabilities, then replace its usage with htmlspecialchars(). Don't call this function on the input data. To protect against XSS you need to encode the output!

  3. If you knew exactly what that filter does and you want to create a polyfill, you can do that easily with regex.

1$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
2function filter_string_polyfill(string $string): string
3{
4    $str = preg_replace('/\x00|&lt;[^&gt;]*&gt;?/', '', $string);
5    return str_replace([&quot;'&quot;, '&quot;'], ['&amp;#39;', '&amp;#34;'], $str);
6}
7

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

QUESTION

Why is it faster to compare strings that match than strings that do not?

Asked 2022-Mar-30 at 11:58

Here are two measurements:

1timeit.timeit('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', number=100000000)
41.4517491540000265
5

As you can see, comparing two strings that match is faster than comparing two strings with the same size that do not match. This is quite disturbing: During a string comparison, I believed that Python was testing strings character by character, so "toto"=="toto" should be longer to test than "toto"=="1234" as it requires four tests against one for the non-matching comparison. Maybe the comparison is hash-based, but in this case, timings should be the same for both comparisons.

Why?

ANSWER

Answered 2022-Mar-30 at 11:57

Combining my comment and the comment by @khelwood:

TL;DR:
When analysing the bytecode for the two comparisons, it reveals the 'time' and 'time' strings are assigned to the same object. Therefore, an up-front identity check (at C-level) is the reason for the increased comparison speed.

The reason for the same object assignment is that, as an implementation detail, CPython interns strings which contain only 'name characters' (i.e. alpha and underscore characters). This enables the object's identity check.


Bytecode:

1timeit.timeit('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis(&quot;'time'=='time'&quot;)
8  1           0 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
9              2 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
10              4 COMPARE_OP               2 (==)
11              6 RETURN_VALUE
12
13In [25]: dis.dis(&quot;'time'=='1234'&quot;)
14  1           0 LOAD_CONST               0 ('time')  # &lt;-- different object (0)
15              2 LOAD_CONST               1 ('1234')  # &lt;-- different object (1)
16              4 COMPARE_OP               2 (==)
17              6 RETURN_VALUE
18

Assignment Timing:

The 'speed-up' can also be seen in using assignment for the time tests. The assignment (and compare) of two variables to the same string, is faster than the assignment (and compare) of two variables to different strings. Further supporting the hypothesis the underlying logic is performing an object comparison. This is confirmed in the next section.

1timeit.timeit('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis(&quot;'time'=='time'&quot;)
8  1           0 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
9              2 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
10              4 COMPARE_OP               2 (==)
11              6 RETURN_VALUE
12
13In [25]: dis.dis(&quot;'time'=='1234'&quot;)
14  1           0 LOAD_CONST               0 ('time')  # &lt;-- different object (0)
15              2 LOAD_CONST               1 ('1234')  # &lt;-- different object (1)
16              4 COMPARE_OP               2 (==)
17              6 RETURN_VALUE
18In [26]: timeit.timeit(&quot;x='time'; y='time'; x==y&quot;, number=1000000)
19Out[26]: 0.0745926329982467
20
21In [27]: timeit.timeit(&quot;x='time'; y='1234'; x==y&quot;, number=1000000)
22Out[27]: 0.10328884399496019
23

Python source code:

As helpfully provided by @mkrieger1 and @Masklinn in their comments, the source code for unicodeobject.c performs a pointer comparison first and if True, returns immediately.

1timeit.timeit('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis(&quot;'time'=='time'&quot;)
8  1           0 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
9              2 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
10              4 COMPARE_OP               2 (==)
11              6 RETURN_VALUE
12
13In [25]: dis.dis(&quot;'time'=='1234'&quot;)
14  1           0 LOAD_CONST               0 ('time')  # &lt;-- different object (0)
15              2 LOAD_CONST               1 ('1234')  # &lt;-- different object (1)
16              4 COMPARE_OP               2 (==)
17              6 RETURN_VALUE
18In [26]: timeit.timeit(&quot;x='time'; y='time'; x==y&quot;, number=1000000)
19Out[26]: 0.0745926329982467
20
21In [27]: timeit.timeit(&quot;x='time'; y='1234'; x==y&quot;, number=1000000)
22Out[27]: 0.10328884399496019
23int
24_PyUnicode_Equal(PyObject *str1, PyObject *str2)
25{
26    assert(PyUnicode_CheckExact(str1));
27    assert(PyUnicode_CheckExact(str2));
28    if (str1 == str2) {                  // &lt;-- Here
29        return 1;
30    }
31    if (PyUnicode_READY(str1) || PyUnicode_READY(str2)) {
32        return -1;
33    }
34    return unicode_compare_eq(str1, str2);
35}
36

Appendix:

  • Reference answer nicely illustrating how to read the disassembled bytecode output. Courtesy of @Delgan
  • Reference answer which nicely describes CPython's string interning. Coutresy of @ShadowRanger

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

QUESTION

Invalid options object. Dev Server has been initialized using an options object that does not match the API schema

Asked 2022-Mar-28 at 21:08

I have been stock on this error on my project when I add "proxy": "http://localhost:6000" in my package.json.

This is the error response after yarn start.

Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.

  • options.allowedHosts[0] should be a non-empty string. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

But everything is fine when I remove the "proxy": "http://localhost:6000".

This is on my package.json:

1{
2  &quot;name&quot;: &quot;client&quot;,
3  &quot;version&quot;: &quot;0.1.0&quot;,
4  &quot;private&quot;: true, 
5  &quot;dependencies&quot;: {
6    &quot;@material-ui/core&quot;: &quot;^4.12.3&quot;,
7    &quot;@testing-library/jest-dom&quot;: &quot;^5.16.1&quot;,
8    &quot;@testing-library/react&quot;: &quot;^12.1.2&quot;,
9    &quot;@testing-library/user-event&quot;: &quot;^13.5.0&quot;,
10    &quot;axios&quot;: &quot;^0.24.0&quot;,
11    &quot;moment&quot;: &quot;^2.29.1&quot;,
12    &quot;react&quot;: &quot;^17.0.2&quot;,
13    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
14    &quot;react-file-base64&quot;: &quot;^1.0.3&quot;,
15    &quot;react-redux&quot;: &quot;^7.2.6&quot;,
16    &quot;react-scripts&quot;: &quot;5.0.0&quot;,
17    &quot;redux&quot;: &quot;^4.1.2&quot;,
18    &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,
19    &quot;web-vitals&quot;: &quot;^2.1.2&quot;
20  },
21  &quot;scripts&quot;: {
22    &quot;start&quot;: &quot;react-scripts start&quot;,
23    &quot;build&quot;: &quot;react-scripts build&quot;,
24    &quot;test&quot;: &quot;react-scripts test&quot;,
25    &quot;eject&quot;: &quot;react-scripts eject&quot;
26  },
27  &quot;eslintConfig&quot;: {
28    &quot;extends&quot;: [
29      &quot;react-app&quot;,
30      &quot;react-app/jest&quot;
31    ]
32  },
33  &quot;browserslist&quot;: {
34    &quot;production&quot;: [
35      &quot;&gt;0.2%&quot;,
36      &quot;not dead&quot;,
37      &quot;not op_mini all&quot;
38    ],
39    &quot;development&quot;: [
40      &quot;last 1 chrome version&quot;,
41      &quot;last 1 firefox version&quot;,
42      &quot;last 1 safari version&quot;
43    ]
44  },
45  &quot;proxy&quot;: &quot;http://localhost:6000&quot;
46}
47

ANSWER

Answered 2021-Dec-19 at 16:06

Here is a workaround. Delete "proxy": "http://localhost:6000". Install package http-proxy-middleware with command npm install http-proxy-middleware --save. Create a file setupProxy.js inside your src folder. Add these lines inside:

1{
2  &quot;name&quot;: &quot;client&quot;,
3  &quot;version&quot;: &quot;0.1.0&quot;,
4  &quot;private&quot;: true, 
5  &quot;dependencies&quot;: {
6    &quot;@material-ui/core&quot;: &quot;^4.12.3&quot;,
7    &quot;@testing-library/jest-dom&quot;: &quot;^5.16.1&quot;,
8    &quot;@testing-library/react&quot;: &quot;^12.1.2&quot;,
9    &quot;@testing-library/user-event&quot;: &quot;^13.5.0&quot;,
10    &quot;axios&quot;: &quot;^0.24.0&quot;,
11    &quot;moment&quot;: &quot;^2.29.1&quot;,
12    &quot;react&quot;: &quot;^17.0.2&quot;,
13    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
14    &quot;react-file-base64&quot;: &quot;^1.0.3&quot;,
15    &quot;react-redux&quot;: &quot;^7.2.6&quot;,
16    &quot;react-scripts&quot;: &quot;5.0.0&quot;,
17    &quot;redux&quot;: &quot;^4.1.2&quot;,
18    &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,
19    &quot;web-vitals&quot;: &quot;^2.1.2&quot;
20  },
21  &quot;scripts&quot;: {
22    &quot;start&quot;: &quot;react-scripts start&quot;,
23    &quot;build&quot;: &quot;react-scripts build&quot;,
24    &quot;test&quot;: &quot;react-scripts test&quot;,
25    &quot;eject&quot;: &quot;react-scripts eject&quot;
26  },
27  &quot;eslintConfig&quot;: {
28    &quot;extends&quot;: [
29      &quot;react-app&quot;,
30      &quot;react-app/jest&quot;
31    ]
32  },
33  &quot;browserslist&quot;: {
34    &quot;production&quot;: [
35      &quot;&gt;0.2%&quot;,
36      &quot;not dead&quot;,
37      &quot;not op_mini all&quot;
38    ],
39    &quot;development&quot;: [
40      &quot;last 1 chrome version&quot;,
41      &quot;last 1 firefox version&quot;,
42      &quot;last 1 safari version&quot;
43    ]
44  },
45  &quot;proxy&quot;: &quot;http://localhost:6000&quot;
46}
47const { createProxyMiddleware } = require('http-proxy-middleware');
48
49module.exports = function(app) {
50  app.use(
51    '/api',
52    createProxyMiddleware({
53      target: 'http://localhost:6000',
54      changeOrigin: true,
55    })
56  );
57};
58

Now, run your app. It should work.

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

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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236git config --global url.&quot;https://github.com/&quot;.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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236git config --global url.&quot;https://github.com/&quot;.insteadOf git://github.com/
237git config --global url.&quot;git@github.com:&quot;.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

Consider using the &quot;jsdom&quot; test environment

Asked 2022-Mar-23 at 20:23

I have this simple test:

1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14

And I have a jest.config.json with this content

1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
17  ]
18}
19

And on my setupTests.ts I have

1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
17  ]
18}
19import '@testing-library/jest-dom'
20

When I run npm run test (which just run jest), I got the following error:

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.

Consider using the "jsdom" test environment.

What I am doing wrong? This used to work before an upgrade.

ANSWER

Answered 2021-Oct-25 at 05:17

In your package.json, or jest.config.js/jest.config.js, change the value of the testEnvironment property to jsdom.

Package.json
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
17  ]
18}
19import '@testing-library/jest-dom'
20&quot;jest&quot;:{
21    &quot;testEnvironment&quot;: &quot;jsdom&quot;
22}
23
jest.config.[js|ts]
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
17  ]
18}
19import '@testing-library/jest-dom'
20&quot;jest&quot;:{
21    &quot;testEnvironment&quot;: &quot;jsdom&quot;
22}
23{
24    &quot;testEnvironment&quot;: &quot;jsdom&quot;
25}
26
Why?

By default, jest uses the node testEnvironment. This essentially makes any tests meant for a browser environment invalid.

jsdom is an implementation of a browser environment, which supports these types of UI tests.

Additional reading

jest testEnvironment documentation

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

QUESTION

Installing scipy and scikit-learn on apple m1

Asked 2022-Mar-22 at 06:21

The installation on the m1 chip for the following packages: Numpy 1.21.1, pandas 1.3.0, torch 1.9.0 and a few other ones works fine for me. They also seem to work properly while testing them. However when I try to install scipy or scikit-learn via pip this error appears:

ERROR: Failed building wheel for numpy

Failed to build numpy

ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

Why should Numpy be build again when I have the latest version from pip already installed?

Every previous installation was done using python3.9 -m pip install ... on Mac OS 11.3.1 with the apple m1 chip.

Maybe somebody knows how to deal with this error or if its just a matter of time.

ANSWER

Answered 2021-Aug-02 at 14:33

Please see this note of scikit-learn about

Installing on Apple Silicon M1 hardware

The recently introduced macos/arm64 platform (sometimes also known as macos/aarch64) requires the open source community to upgrade the build configuation and automation to properly support it.

At the time of writing (January 2021), the only way to get a working installation of scikit-learn on this hardware is to install scikit-learn and its dependencies from the conda-forge distribution, for instance using the miniforge installers:

https://github.com/conda-forge/miniforge

The following issue tracks progress on making it possible to install scikit-learn from PyPI with pip:

https://github.com/scikit-learn/scikit-learn/issues/19137

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

QUESTION

TypeError: load() missing 1 required positional argument: 'Loader' in Google Colab

Asked 2022-Mar-04 at 11:01

I am trying to do a regular import in Google Colab.
This import worked up until now.
If I try:

1import plotly.express as px
2

or

1import plotly.express as px
2import pingouin as pg
3

I get an error:

1import plotly.express as px
2import pingouin as pg
3---------------------------------------------------------------------------
4TypeError                                 Traceback (most recent call last)
5&lt;ipython-input-19-86e89bd44552&gt; in &lt;module&gt;()
6----&gt; 1 import plotly.express as px
7
89 frames
9/usr/local/lib/python3.7/dist-packages/plotly/express/__init__.py in &lt;module&gt;()
10     13     )
11     14 
12---&gt; 15 from ._imshow import imshow
13     16 from ._chart_types import (  # noqa: F401
14     17     scatter,
15
16/usr/local/lib/python3.7/dist-packages/plotly/express/_imshow.py in &lt;module&gt;()
17      9 
18     10 try:
19---&gt; 11     import xarray
20     12 
21     13     xarray_imported = True
22
23/usr/local/lib/python3.7/dist-packages/xarray/__init__.py in &lt;module&gt;()
24      1 import pkg_resources
25      2 
26----&gt; 3 from . import testing, tutorial, ufuncs
27      4 from .backends.api import (
28      5     load_dataarray,
29
30/usr/local/lib/python3.7/dist-packages/xarray/tutorial.py in &lt;module&gt;()
31     11 import numpy as np
32     12 
33---&gt; 13 from .backends.api import open_dataset as _open_dataset
34     14 from .backends.rasterio_ import open_rasterio as _open_rasterio
35     15 from .core.dataarray import DataArray
36
37/usr/local/lib/python3.7/dist-packages/xarray/backends/__init__.py in &lt;module&gt;()
38      4 formats. They should not be used directly, but rather through Dataset objects.
39      5 
40----&gt; 6 from .cfgrib_ import CfGribDataStore
41      7 from .common import AbstractDataStore, BackendArray, BackendEntrypoint
42      8 from .file_manager import CachingFileManager, DummyFileManager, FileManager
43
44/usr/local/lib/python3.7/dist-packages/xarray/backends/cfgrib_.py in &lt;module&gt;()
45     14     _normalize_path,
46     15 )
47---&gt; 16 from .locks import SerializableLock, ensure_lock
48     17 from .store import StoreBackendEntrypoint
49     18 
50
51/usr/local/lib/python3.7/dist-packages/xarray/backends/locks.py in &lt;module&gt;()
52     11 
53     12 try:
54---&gt; 13     from dask.distributed import Lock as DistributedLock
55     14 except ImportError:
56     15     DistributedLock = None
57
58/usr/local/lib/python3.7/dist-packages/dask/distributed.py in &lt;module&gt;()
59      1 # flake8: noqa
60      2 try:
61----&gt; 3     from distributed import *
62      4 except ImportError:
63      5     msg = (
64
65/usr/local/lib/python3.7/dist-packages/distributed/__init__.py in &lt;module&gt;()
66      1 from __future__ import print_function, division, absolute_import
67      2 
68----&gt; 3 from . import config
69      4 from dask.config import config
70      5 from .actor import Actor, ActorFuture
71
72/usr/local/lib/python3.7/dist-packages/distributed/config.py in &lt;module&gt;()
73     18 
74     19 with open(fn) as f:
75---&gt; 20     defaults = yaml.load(f)
76     21 
77     22 dask.config.update_defaults(defaults)
78
79TypeError: load() missing 1 required positional argument: 'Loader'
80

I think it might be a problem with Google Colab or some basic utility package that has been updated, but I can not find a way to solve it.

ANSWER

Answered 2021-Oct-15 at 21:11

Found the problem.
I was installing pandas_profiling, and this package updated pyyaml to version 6.0 which is not compatible with the current way Google Colab imports packages.
So just reverting back to pyyaml version 5.4.1 solved the problem.

For more information check versions of pyyaml here.
See this issue and formal answers in GitHub

##################################################################
For reverting back to pyyaml version 5.4.1 in your code, add the next line at the end of your packages installations:

1import plotly.express as px
2import pingouin as pg
3---------------------------------------------------------------------------
4TypeError                                 Traceback (most recent call last)
5&lt;ipython-input-19-86e89bd44552&gt; in &lt;module&gt;()
6----&gt; 1 import plotly.express as px
7
89 frames
9/usr/local/lib/python3.7/dist-packages/plotly/express/__init__.py in &lt;module&gt;()
10     13     )
11     14 
12---&gt; 15 from ._imshow import imshow
13     16 from ._chart_types import (  # noqa: F401
14     17     scatter,
15
16/usr/local/lib/python3.7/dist-packages/plotly/express/_imshow.py in &lt;module&gt;()
17      9 
18     10 try:
19---&gt; 11     import xarray
20     12 
21     13     xarray_imported = True
22
23/usr/local/lib/python3.7/dist-packages/xarray/__init__.py in &lt;module&gt;()
24      1 import pkg_resources
25      2 
26----&gt; 3 from . import testing, tutorial, ufuncs
27      4 from .backends.api import (
28      5     load_dataarray,
29
30/usr/local/lib/python3.7/dist-packages/xarray/tutorial.py in &lt;module&gt;()
31     11 import numpy as np
32     12 
33---&gt; 13 from .backends.api import open_dataset as _open_dataset
34     14 from .backends.rasterio_ import open_rasterio as _open_rasterio
35     15 from .core.dataarray import DataArray
36
37/usr/local/lib/python3.7/dist-packages/xarray/backends/__init__.py in &lt;module&gt;()
38      4 formats. They should not be used directly, but rather through Dataset objects.
39      5 
40----&gt; 6 from .cfgrib_ import CfGribDataStore
41      7 from .common import AbstractDataStore, BackendArray, BackendEntrypoint
42      8 from .file_manager import CachingFileManager, DummyFileManager, FileManager
43
44/usr/local/lib/python3.7/dist-packages/xarray/backends/cfgrib_.py in &lt;module&gt;()
45     14     _normalize_path,
46     15 )
47---&gt; 16 from .locks import SerializableLock, ensure_lock
48     17 from .store import StoreBackendEntrypoint
49     18 
50
51/usr/local/lib/python3.7/dist-packages/xarray/backends/locks.py in &lt;module&gt;()
52     11 
53     12 try:
54---&gt; 13     from dask.distributed import Lock as DistributedLock
55     14 except ImportError:
56     15     DistributedLock = None
57
58/usr/local/lib/python3.7/dist-packages/dask/distributed.py in &lt;module&gt;()
59      1 # flake8: noqa
60      2 try:
61----&gt; 3     from distributed import *
62      4 except ImportError:
63      5     msg = (
64
65/usr/local/lib/python3.7/dist-packages/distributed/__init__.py in &lt;module&gt;()
66      1 from __future__ import print_function, division, absolute_import
67      2 
68----&gt; 3 from . import config
69      4 from dask.config import config
70      5 from .actor import Actor, ActorFuture
71
72/usr/local/lib/python3.7/dist-packages/distributed/config.py in &lt;module&gt;()
73     18 
74     19 with open(fn) as f:
75---&gt; 20     defaults = yaml.load(f)
76     21 
77     22 dask.config.update_defaults(defaults)
78
79TypeError: load() missing 1 required positional argument: 'Loader'
80!pip install pyyaml==5.4.1
81

It is important to put it at the end of the installation, some of the installations will change the pyyaml version.

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

QUESTION

Switch' is not exported from 'react-router-dom'

Asked 2022-Mar-01 at 09:07

In package.json file react-router-dom dependencies added. App component wrapped by BrowswerRouter , but when I wrap route by switch it says the following error Switch' is not exported from 'react-router-dom'. I deleted the package.json.lock ,node modules, installed npm again and npm install @babel/core --save. Still not working. I successfully wasted 6 hour for this. Can you please help me to fix this? why it's not importing?

Index.js

1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
7  document.getElementById('root')
8);
9

App.js:

1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
7  document.getElementById('root')
8);
9 import logo from './logo.svg';
10import './App.css';
11import React from 'react';
12import {Switch,Route,Link} from 'react-router-dom';
13import Home from './Home';
14class App extends React.Component {
15  componentDidMount(){
16    alert('mounting');
17  }
18  componentDidUpdate(){
19    alert('updated');
20  }
21 render(){
22  return (
23    
24    &lt;div className=&quot;App&quot;&gt;
25     
26    &lt;div&gt;
27      &lt;Link to=&quot;/&quot;&gt;Home&lt;/Link&gt;
28    &lt;/div&gt;
29
30    &lt;hr /&gt;
31
32    &lt;Switch&gt;
33      &lt;Route exact path=&quot;/&quot;&gt;
34        &lt;Home/&gt;
35      &lt;/Route&gt;
36    &lt;/Switch&gt;
37 
38  &lt;/div&gt;
39 
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48    const Home = () =&gt; {
49    return &lt;h1&gt;Home&lt;/h1&gt;;
50  };
51  
52  export default Home;
53

package.json

1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
7  document.getElementById('root')
8);
9 import logo from './logo.svg';
10import './App.css';
11import React from 'react';
12import {Switch,Route,Link} from 'react-router-dom';
13import Home from './Home';
14class App extends React.Component {
15  componentDidMount(){
16    alert('mounting');
17  }
18  componentDidUpdate(){
19    alert('updated');
20  }
21 render(){
22  return (
23    
24    &lt;div className=&quot;App&quot;&gt;
25     
26    &lt;div&gt;
27      &lt;Link to=&quot;/&quot;&gt;Home&lt;/Link&gt;
28    &lt;/div&gt;
29
30    &lt;hr /&gt;
31
32    &lt;Switch&gt;
33      &lt;Route exact path=&quot;/&quot;&gt;
34        &lt;Home/&gt;
35      &lt;/Route&gt;
36    &lt;/Switch&gt;
37 
38  &lt;/div&gt;
39 
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48    const Home = () =&gt; {
49    return &lt;h1&gt;Home&lt;/h1&gt;;
50  };
51  
52  export default Home;
53&quot;dependencies&quot;: {
54    &quot;@babel/core&quot;: &quot;^7.16.0&quot;,
55    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.4&quot;,
56    &quot;@testing-library/react&quot;: &quot;^11.1.0&quot;,
57    &quot;@testing-library/user-event&quot;: &quot;^12.1.10&quot;,
58    &quot;react&quot;: &quot;^17.0.2&quot;,
59    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
60    &quot;react-router&quot;: &quot;^6.0.0&quot;,
61    &quot;react-router-dom&quot;: &quot;^6.0.0&quot;,
62    &quot;react-scripts&quot;: &quot;4.0.3&quot;,
63    &quot;web-vitals&quot;: &quot;^1.0.1&quot;
64  },
65

ANSWER

Answered 2021-Nov-04 at 18:10
Using Routes instead of Switch in react-router v6

You are using react-router-dom version 6, which replaced Switch with the Routes component

1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
7  document.getElementById('root')
8);
9 import logo from './logo.svg';
10import './App.css';
11import React from 'react';
12import {Switch,Route,Link} from 'react-router-dom';
13import Home from './Home';
14class App extends React.Component {
15  componentDidMount(){
16    alert('mounting');
17  }
18  componentDidUpdate(){
19    alert('updated');
20  }
21 render(){
22  return (
23    
24    &lt;div className=&quot;App&quot;&gt;
25     
26    &lt;div&gt;
27      &lt;Link to=&quot;/&quot;&gt;Home&lt;/Link&gt;
28    &lt;/div&gt;
29
30    &lt;hr /&gt;
31
32    &lt;Switch&gt;
33      &lt;Route exact path=&quot;/&quot;&gt;
34        &lt;Home/&gt;
35      &lt;/Route&gt;
36    &lt;/Switch&gt;
37 
38  &lt;/div&gt;
39 
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48    const Home = () =&gt; {
49    return &lt;h1&gt;Home&lt;/h1&gt;;
50  };
51  
52  export default Home;
53&quot;dependencies&quot;: {
54    &quot;@babel/core&quot;: &quot;^7.16.0&quot;,
55    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.4&quot;,
56    &quot;@testing-library/react&quot;: &quot;^11.1.0&quot;,
57    &quot;@testing-library/user-event&quot;: &quot;^12.1.10&quot;,
58    &quot;react&quot;: &quot;^17.0.2&quot;,
59    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
60    &quot;react-router&quot;: &quot;^6.0.0&quot;,
61    &quot;react-router-dom&quot;: &quot;^6.0.0&quot;,
62    &quot;react-scripts&quot;: &quot;4.0.3&quot;,
63    &quot;web-vitals&quot;: &quot;^1.0.1&quot;
64  },
65import {
66  BrowserRouter,
67  Routes, // instead of &quot;Switch&quot;
68  Route,
69} from &quot;react-router-dom&quot;;
70
71// ...
72
73    &lt;BrowserRouter&gt;
74      &lt;Routes&gt;
75        &lt;Route exact path=&quot;/&quot; element={&lt;Home /&gt;}&gt;
76          &lt;Home/&gt;
77        &lt;/Route&gt;
78      &lt;/Routes&gt;
79    &lt;/BrowserRouter&gt;
80

Note that you now also pass your component as the element prop instead of using children.

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

QUESTION

IntelliJ - Git is not installed: Cannot identify version of git executable: no response

Asked 2022-Feb-14 at 04:51

I'm using IntelliJ on my MacBook and get this message every time I open the app. I already checked the Preferences > Version Control > Git under "Path to Git executable" and set this path to the path that is shown in my terminal for "whereis git". Also, testing the path in the IntelliJ settings returns a "Git version is 2.30.1". What else can I do to fix this problem?

ANSWER

Answered 2021-Nov-15 at 07:23

In my case the issue was solved by invalidating cache and restarting IDE. Simply go to Files -> Invalidate Caches -> Invalidate and Restart.

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

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in Testing

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

Share this Page

share link

Get latest updates on Testing