Popular New Releases in Database
elasticsearch
Elasticsearch 8.1.3
redis
7.0-rc3
prometheus
2.35.0-rc1 / 2022-04-14
etcd
v3.5.0
tidb
tidb-server v6.0.0
Popular Libraries in Database
by elastic java
59266
NOASSERTION
Free and Open, Distributed, RESTful Search Engine
by redis c
54360
BSD-3-Clause
Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
by prometheus go
42027
Apache-2.0
The Prometheus monitoring system and time series database.
by etcd-io go
37139
Apache-2.0
Distributed reliable key-value store for the most critical data of a distributed system
by pingcap go
31064
Apache-2.0
TiDB is an open source distributed HTAP database compatible with the MySQL protocol
by google c++
28077
BSD-3-Clause
LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
by dbeaver java
26064
Apache-2.0
Free universal database tool and SQL client
by sequelize javascript
26011
MIT
An easy-to-use and promise-based multi SQL dialects ORM tool for Node.js | Postgres, MySQL, MariaDB, SQLite, MSSQL, Snowflake & DB2
by rethinkdb c++
24920
Apache-2.0
The open-source database for the realtime web.
Trending New libraries in Database
by tiangolo python
7183
MIT
SQL databases in Python, designed for simplicity, compatibility, and robustness.
by benbjohnson go
4979
Apache-2.0
Streaming replication for SQLite.
by benbusby python
4865
MIT
A self-hosted, ad-free, privacy-respecting metasearch engine
by opensearch-project java
4846
Apache-2.0
🔎 Open source distributed and RESTful search engine.
by oceanbase c++
4231
NOASSERTION
OceanBase is an enterprise distributed relational database with high availability, high performance, horizontal scalability, and compatibility with SQL standards.
by datafuselabs rust
3758
Apache-2.0
A modern Elasticity and Performance cloud data warehouse, activate your object storage for real-time analytics.
by facebookresearch python
3638
MIT
Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.
by probml jupyter notebook
3037
MIT
"Probabilistic Machine Learning" - a book series by Kevin Murphy
by jlongster javascript
2382
MIT
sqlite3 in ur indexeddb (hopefully a better backend soon)
Top Authors in Database
1
69 Libraries
26370
2
55 Libraries
62850
3
27 Libraries
6702
4
25 Libraries
7864
5
24 Libraries
529
6
23 Libraries
741
7
22 Libraries
440
8
22 Libraries
5616
9
21 Libraries
59840
10
20 Libraries
6042
1
69 Libraries
26370
2
55 Libraries
62850
3
27 Libraries
6702
4
25 Libraries
7864
5
24 Libraries
529
6
23 Libraries
741
7
22 Libraries
440
8
22 Libraries
5616
9
21 Libraries
59840
10
20 Libraries
6042
Trending Kits in Database
This kit is for for the BuildWithAi Hackathon. The name of the project is "Read-Easy" This project is to provide an adaptive and immersive learning tool for students with dyslexia. Read Easy is a platform that helps teachers convert existing learning materials to suit the needs of students with dyslexia. It involves a Dyslexic Friendly Reader that provides the student to control things like Font size, Font Spacing, Read out the words, Visualise the words etc. The platform also provides a predictive assessment tool that takes in the students handwriting and checks if they are improving.
Core Frameworks
The backend is written in Flask ( Python ) which provides the API interaction between the server and the DB The frontend is written in Svelte and enables an interactive UI. Handwriting Recognition is done using Tesseract OCR module and the text to speech is based on the browsers Text to Speech Library.
Other tools
This kit is for for the BuildWithAi Hackathon. The name of the project is "Read-Easy" This project is to provide an adaptive and immersive learning tool for students with dyslexia. Read Easy is a platform that helps teachers convert existing learning materials to suit the needs of students with dyslexia. It involves a Dyslexic Friendly Reader that provides the student to control things like Font size, Font Spacing, Read out the words, Visualise the words etc. The platform also provides a predictive assessment tool that takes in the students handwriting and checks if they are improving.
Core Frameworks
The backend is written in Flask ( Python ) which provides the API interaction between the server and the DB The frontend is written in Svelte and enables an interactive UI. Handwriting Recognition is done using Tesseract OCR module and the text to speech is based on the browsers Text to Speech Library.
Other tools
Group Name 4
Around the globe, people seek the help of doctors when they are ill, but they are not available due to some reason. The Cancer Disease Prediction application is end-user support and online consultation treatment. The application allows user to share their health-related metrics for cancer prediction, which processes patient details to check for various conditions that could be associated. We can use intelligent data mining techniques to guess the most accurate state of a patient's details. Various steps involved in this kit are: 1. Data Preparation 2. Data Mining 3. Pattern Recognition 4. Knowledge Representation Based on the result, the system automatically shows the result-specific doctors for further treatment. The system allows users to view doctor's details. Listed below are the best libraries that can help data mining and build a prediction system for cancer.
Pattern Recognition
Data Mining
Data preparation
Knowledge Representation
Go Database libraries offer a generic SQL database interface. It supports databases like MySQL, SQLite, PostgreSQL, and many more. This library offers an effortless way to connect various databases and manage those connections. It supports the execution of SQL queries and prepared statements, allowing easy and secure access to databases.
Go Database libraries offer a simple and intuitive way to manage database transactions, allowing the execution of different SQL statements as a single unit of work. This library offers detailed error handling, providing developers with more information on what went wrong in case of any error. This library supports prepared statements, which will help prevent SQL injection attacks and make it a secure way to interact with databases. It is a generic SQL database interface and supports multiple database drivers making it a flexible and versatile choice for building database-driven applications.
Here is the list of the 13 best Go Database libraries that are handpicked to help developers:
prometheus:
- Is designed for collecting metrics from various sources, storing, and querying them to provide insights into a system's health and performance.
- Offers a set of tools to build applications that exposes metrics in a format that prometheus can understand.
- Supports several metrics like gauges, summaries, counters, and histograms.
db:
- Is a productive data access layer for the Go programming language, which offers agnostic tools to work with various data sources.
- Provides tools for common operations with databases and stays out of the way with advanced cases.
- Offers a common interface for developers to work with different NoSQL and SQL database engines.
Here are the top NodeJS MongoDB libraries you can use to offer features to connect and manage connections to MongoDB databases, like encryption and authentication options. The features of MongoDB libraries depend on the programming language and the specific libraries used. It supports MongoDB’s GridFS feature, which allows storing and retrieving binary data and large files.
MongoDB library offers an easy-to-use interface for performing basic CRUD operations on the MongoDB collections. You can also get features for using MongoDB’s powerful Aggregation Framework for performing advanced data analysis and queries. This library provides schema validation to ensure data confirms a specific format or rule. It offers features that help create and manage indexes on MongoDB collections to optimize query performance. It offers support for MongoDB’s sharding and replication features, which will allow for high scalability and availability of the database. It also offers features for debugging and testing applications, like mock debuggers and databases.
Here is the list of the top 22 NodeJS MongoDB libraries that are handpicked to help developers choose the appropriate one as per their requirements:
prisma:
- Is a next-generation ORM (Object Relational Mapping) with tools like Prisma Studio, Migrate, and Client.
- Can be used in any NodeJS or TypeScript backend applications, like microservices and serverless applications, like GraphQL API, gRPC API, REST API, and anything that requires a database.
- Allows developers to define their application models in an intuitive data modeling language connected to a database and will define a generation.
mongoose:
- Is a MongoDB object modeling tool designed for working in an asynchronous environment that supports Deno and NodeJS.
- For delivering commercial maintenance and support for open source dependencies, you can use Tidelift for building your applications.
- Buffers all the commands until it is connected to the database so that you do not have to wait until it connects to MongoDB for defining models, running queries, and many more.
reaction:
- Is a headless commerce platform, API-first, built using MongoDB, GraphQL, and NodeJS, which plays nicely with Docker, Kubernetes, and npm.
- Returns data in split seconds, and quicker queries mean quicker web pages.
- A flexible plugin system will allow you to pick and select which integrations work best for you.
node-elm:
- Is a package that offers functionality for using the Elm programming language with NodeJS.
- You can compile Elm code to JavaScript, run tests, and generate documentation.
- Offers various utility functions for working with Elm code, like parsing source files and generating Elm code programmatically.
node-mongodb-native:
- Is the official MongoDB driver for NodeJS, maintained and developed by MongoDB Inc.
- Is designed to be scalable and performant, with support for features like streaming cursors and connection pooling.
- Also offers various utility functions for working with the binary format and BSON used by MongoDB.
payload:
- Is a CMS designed for developers from the ground up to deliver what they require to build a great digital product.
- Provides you with everything you need but takes a step back and lets you build what you want in JavaScript or TypeScript with no unnecessary complexity brought by GUIs.
- Completely control the admin panel by using your own React components and will swap out fields or even entire views easily.
nodeclub:
- Is a free and open-source community platform built on top of the NodeJS platform.
- A web-based discussion and forum board allows users to create and participate in discussions on diverse topics.
- Supports features like user authentication and authorization, search functionality, and email notifications.
mikro-orm:
- Is an open source TypeScript ORM which simplifies working with databases in NodeJS applications.
- Supports different databases like PostgreSQL, SQLite, MongoDB, and MySQL.
- You can easily define your data models using TypeScript decorators and classes and perform common CURD operations on your data with a few lines of code.
mean:
- Is a full-stack JavaScript open source solution that provides a solid starting point for NodeJS, AngularJS, MongoDB, and Express based applications.
- Builds a robust framework to support daily development requirements, which will help developers use better practices when working with JavaScript components.
- Offers reusable tools, guidelines, and modules to help developers build web applications efficiently and quickly.
mongo-express:
- Is a web-based administrative UI for MongoDB, a popular NoSQL database that provides an intuitive GUI that allows users to view and edit database indexes, documents, and collections.
- You can perform common administrative tasks like deleting or creating collections and databases, managing users and permissions, and removing or adding indexes.
- Allows you to execute MongoDB shell commands directly from the interface.
project_mern_memories:
- Is a code repository that contains the source code for web applications built using the MERN stack.
- Is a popular web development stack that includes four technologies, Express, NodeJS, MongoDB, and React.
- Includes features like image uploading and storage, pagination, and user authorization and authentication.
uptime:
- Monitor thousands of websites, check the presence of a pattern in the response body and tweak the frequency of monitoring on a per-check basis up to the second.
- Helps receive notifications whenever a check goes down by email, on the console, and screen.
- Can record availabilities statistics for further reporting and detailed uptime reports with animated charts.
builderbook:
- Is a comprehensive set of resources and tools for helping developers build and launch web applications efficiently and quickly.
- Includes various components and features which can be customized and integrated into any web application, like user management and authentication, email handling, and payment processing.
- Is focused on helping developers create a high-quality web application using modern technologies and best practices.
DoraCMS:
- Is a free and open source CMS built on top of the NodeJS platform, which offers a web-based administrative interface for managing users, site settings, and content.
- Is designed to be extensible and modular with a flexible plugin option, allowing developers to add new functionality and features to the CMS.
- Offers a RESTful API that can be used for interacting with the CMS programmatically.
mongodb-memory-server:
- Is an open source NodeJS library which offers an in-memory MongoDB server for development and testing purposes.
- Allows you to quickly spin up a MongoDB server instance in memory without requiring a separate MongoDB configuration or installation.
- You can write tests and develop applications that rely on MongoDB without requiring a separate MongoDB instance running on a remote server or your local machine.
monk:
- Is a lightweight MongoDB driver for NodeJS, offering an easy-to-use and simple API for interacting with MongoDB databases.
- Offers a high-level API that abstracts away many low-level details for working with MongoDB making it easy for developers to get started with minimal setup.
- Provides a simple and flexible query API that allows you to build any query easily.
mongojs:
- Is a lightweight NodeJS library that offers a simple API for interacting with MongoDB databases.
- Allows you to perform common database operations like map-reduce, CRUD operations, etc.
- Offers an intuitive and simple API that is easy to learn and use and supports various features like replication, sharding, and authentication.
myDrive:
- Is an open source cloud file storage server for hosting myDrive on your server or trusted platform and then accessing myDrive through your web browser.
- Uses MongoDB for storing folder/file metadata and will support multiple databases for storing the file chunks, like the Filesystem and Amazon S3.
- Is built using TypeScript and NodeJS and can help upload files, google drive support, and download files.
node-login:
- Is a NodeJS module that offers a simple authentication system for web applications.
- Is designed to be easy to use and customize and supports various authentication strategies, like password authentication and email, two-factor authentication, and OAuth authentication.
- Includes features like email verification, user profile management, password hashing, and session management.
mongorito:
- Is based on Redux, which opens the doors for customizing anything from model’s state to the behavior of core methods.
- Every model instance has a different Redux store, ensuring isolation between other models and easy extensibility.
- Ships with a barebones model with basic set/get, remove/save, and querying functionality and lets you be in control of what is included.
nodercms:
- Is an open source CMS built on top of the NodeJS platform, which offers a web-based administrative interface for managing users, content, and other site settings.
- You can create and manage posts, pages, and other content types and supports features like theme customization, plugin support, user authorization, and authentication.
- Is designed to be extensible and modular, with a flexible plugin architecture that allows developers to add new functionality and features to the CMS.
rest-api-nodejs-mongodb:
- Is a ready-to-use boilerplate for REST API Development with Express, MongoDB, and NodeJS.
- Offers pre-defined response structures with a proper status code, including CORS.
- Includes API collection for Postman, linting with Eslint, CI with Travis CI, and test cases with Chai and Mocha.
Hangman game is a word, string guessing game where each player plays to build a missing word, string, by guessing one letter at a time. For each mistake made, the hangman figure will be formed: starts with gallows, then head, body, and finally, the arms and legs. You will win the game if you choose letters to create the correct word before the figure of the hangman is completed. If not, it will be hanged and will finish the game. Follow the following steps to build your own hangman, 1. Development Environment 2. Database 3. String Match 4. Hangman Creation 5. Score Calculation
Database
Database is used to store the words.
Hangman Creation
If the player enters the wrong letter, the figure of hangman will be formed by starting with gallows and if he does it again then head is created, likewise body , arms and legs is created on entering wrong letter.
Development Environment
PyCharm is used for development of game.
String Match
String match is used to check whether the user given word is present in the database or not.
Score Calculation
On entering each letter which is present in word the player will get a score.
Here are the best Python database access libraries for your web application. You can use these libraries in Python to directly interact with and access a variety of databases and perform a variety of operations, such as create, read, update, and delete records.
You can develop a straightforward application using these Python libraries to interact with SQLite, MySQL, and PostgreSQL databases. With some basic knowledge of Python and SQL, as well as the knowhow to work with database management systems, you can develop applications across different databases using a Python script in three simple steps:
- Connect with a variety of database management systems using Python libraries.
- Interact with various databases such as SQLite, MySQL, and PostgreSQL.
- Execute some common database queries using these Python libraries.
We have handpicked top and trending Python libraries based on popularity, licensing and unique features to build database access functions in your applications:
SQLAlchemy:
- Used for efficient and high-performing database access.
- A comprehensive SQL toolkit and Object Relational Mapper (ORM).
- Provides a high-level API to interact with databases.
Django ORM:
- Used to connect with the database backend of your choice with ORM functionality.
- It’s the built-in ORM for the Django web framework.
- Provides an easy-to-use API for performing database operations.
- Can be used with regular python scripts.
PyMySQL:
- Used for fast, secure, and reliable interaction with the MySQL databases.
- A pure Python MySQL client library for MySQL database access.
- It implements the Python Database API v2.0.
psycopg2:
- Used in Database, SQL Database, PostgresSQL applications.
- A PostgreSQL database adapter for Python.
- Provides a fast and reliable way to interact with PostgreSQL databases.
peewee:
- Used for basic operations like storing data and retrieving data.
- A minimalistic ORM that supports SQLite, MySQL, and PostgreSQL databases.
- Peewee provides a magical helper fn(), used to call any SQL function.
Aiomysql:
- Used in Database, SQL Database, MariaDB applications.
- It depends on and reuses most parts of PyMySQL.
- Preserve the same api, look and feel as the awesome aiopg library.
Queries:
- Used for interacting with PostgreSQL by reducing the complexity of psycopg2 library.
- Makes writing PostgreSQL client applications both fast and easy.
- It’s a BSD licensed opinionated wrapper of the Python psycopg2 library.
C# is a general-purpose programming language developed by Microsoft. C# was designed to be simple, object-oriented and type-safe. It has been widely used for enterprise applications and has many other uses, including video games, desktop applications and embedded systems. C# SQL Database libraries are important to any development project. They provide a clean and simple API for working with data from a SQL database. SQL Database is a managed, relational database service that makes it easy to set up, manage and scale your database. It does not require a separate server process and interacts directly with the filesystem. C# SQL Database libraries are used for interacting with a database in C#. These libraries provide an easier way to connect to a database, create tables and store data. Some of the most popular C# SQL Database Open Source libraries among developers are: querybuilder - SQL query builder; DbUp - NET library that helps you to deploy changes; chinook-database - Sample database for SQL Server, Oracle, MySQL, PostgreSQL, SQLite, DB2.
The use of a library for searching is important in C++ because it allows you to get all the functionality needed for searching from a single location, instead of having to write everything yourself. It helps avoid code duplication and makes your program easier to maintain. C++ Search Engine libraries like typesense, annoy, nanoflann are great for providing fast and easy-to-use search functionality. Typesense is a library for building search engines in C++. It uses the same algorithm as Lucene (the Java library used in Elasticsearch) and has very similar APIs. The biggest difference between Typesense and Lucene is that Typesense uses compile-time reflection to generate code for each indexing operation and uses template metaprogramming to generate code for the query engine. Nanoflann is a C++ template library with bindings in other languages such as C#, Java and Python. The library provides support for approximate nearest neighbors queries on multi-dimensional data sets stored in binary formats such as BLASTER XML or HDF5 with multithreaded computation. The following is a list of the most popular C++ Search Engine libraries,
The Go Document Database libraries are a set of packages that provide a document-oriented database API for Go. The go-documentdb package, which provides a database driver. The driver can be used to create and manipulate databases, tables, and rows in your application. The driver also supports transactions, so you can use it to perform multiple actions in an atomic block. badger is a high performance key-value store, similar to Redis. It supports both in-memory and on-disk stores. tiedot is a document database library similar to MongoDB, but without the overhead of embedding documents in the same process as the application executing them. Many developers depend on the following open source Go Document Database libraries
Go is an open source programming language developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. Go is a programming language that makes it easy to build simple, reliable, and efficient software. Go has been used to build many large-scale web applications. It is a fast and efficient database that stores high-velocity measurements with a flexible data model and a rich set of query languages. Time Series Database (TSDB) is a database for time series data. A time series database is a database that is optimized for storing data that varies over time. A time series database enables the user to store and analyze historical data, usually time-stamped data. It is designed for high-performance analytics on large datasets, typically in real-time. Many developers depend on the following Go Time Series Database open source libraries: prometheus - The Prometheus monitoring system and time series database; VictoriaMetrics - costeffective monitoring solution and time series database; lindb - high performance.
JavaScript Graph Database libraries are a new platform for building real-time data applications. The most common use case is to build an application that displays social graphs, such as Facebook, Twitter and LinkedIn. A JavaScript graph database library is a library that allows you to store and query a graph structure. These are useful for many applications, including social network sites and games. FortuneJS is a simple, lightweight GraphQL server with built-in clustering capabilities. FortuneJS uses MongoDB as its storage layer. LevelGraph is a JavaScript library for querying graph databases using SPARQL and JSON-LD. LevelGraph has a number of different backends including Neo4j, OrientDB, RethinkDB and MongoDB. Graphexp is an open-source JavaScript library for creating and querying graphs using Gremlin-style traversal expressions. Graphexp supports Neo4j and OrientDB as backend databases. A few of the most popular open source JavaScript Graph Database libraries for developers are:
PHP Search Engine libraries are the tools used to create search engines in PHP. These libraries can be used to find documents on a website, or to perform a search on large amounts of data. They provide the user with a wide range of tools that can be used to create search engines with ease. These libraries allow you to create complex search engines, which perform multiple tasks like sorting, pagination, ranking, caching, spell checking and much more! diskover-community is another very popular php library for searching through websites or documents. It has been developed by YOOtheme team and can be used for searching through websites or documents. The best part about this library is that it supports multiple search engines like Google, Bing, Yahoo etc. ElasticSuite is another PHP library that helps you to search through your data using ElasticSearch or Solr server(s). tntsearch is a very popular php library for searching through websites. It is developed by Thomas Rabaix and can be used for searching through websites or documents. Some of the most widely used open source PHP Search Engine libraries among developers include,
Python Cloud Database libraries like jina, gnes, hsds are very useful for building cloud database applications. They allow you to access your data from anywhere in the world, and even provide a variety of security options. They provide support for a wide range of databases such as MySQL, PostgreSQL, MongoDB and more. The jina library (Jini) is a Python interface to Apache HTTP Server's JINI protocol. It allows you to publish information about objects as web pages, or retrieve them as web pages. The hsds library (Hadoop Streaming Data Sources) provides an interface to MapReduce jobs on Hadoop. The hsds library also provides a simple interface that makes it easy to use. It is an open source tool which uses the WebStorage API to store files in the cloud. It can be used for storing images, videos, audio files and other file types in the cloud. The gnes library can be used to store files and folders on the cloud. It provides a simple interface that makes it easy to use. Popular open source Python Cloud Database libraries include
The Ruby programming language is a powerful tool for building database applications. Ruby has evolved into a de facto standard for interacting with databases, extending the capabilities of the standard libraries to include SQL and NoSQL databases, and adding support for various database backends. sequel is a flexible and easy-to-use ORM that allows you to define models in a SQL way and use them to access your database. pgsync is a tool that synchronizes data between multiple PostgreSQL databases using COPY FROM SCM command. activegraph is an API client library for ActiveRecord/Base in Ruby on Rails. Full list of the best open source Ruby database libraries are given below
C# Search Engine libraries are very useful in helping developers to build search engines. There are many libraries available for the purpose and they can be used to build search engines. These libraries provide the functionality to search books, e-books and scientific articles from different repositories like PubMed, Google Scholar etc. The user can easily search for a specific document, filter the results based on different parameters and download the result as a file or save it in an XML file. The most popular C# Search Engine library is Lucenenet which is open source and a very flexible tool. Lucene can be used to build a full-blown search engine or just for simple tasks like searching for keywords in a string. SymSpell is a lightweight spell checker library for .NET written in C# which uses the Microsoft Word dictionary data files as its source of verification against words from any other dictionary file or any custom word list file (e.g., Wikipedia). Resinis a simple but powerful indexer that supports many features such as fuzzy search, spell checking, and auto-correction. It also works well with Unity's built-in filesystem API and allows you to customize how your data is stored in memory through a custom implementation of IStorageProvider. The entire list of open source C# Search Engine libraries are provided below.
Go Cloud Database libraries such as cockroach, weaviate, radon and steampipe are great as they are fast and performant. They have a good performance on the cloud because they are built to scale horizontally. They’re easy to use and configure as you don’t need to be an expert in database management or even know what a database is. They’re all self-contained and work with your existing databases and tools. They are inexpensive to run - especially when compared to the cost of running your own server. Weaviate is an efficient, high performance and easy-to-use HTTP service for Go that you can use to run your applications on AWS Lambda. It uses gRPC to communicate with AWS services like DynamoDB and S3, has built-in support for Redis, MySQL and PostgreSQL, as well as integration with Consul and Zookeeper. Cockroach is a distributed key-value store that supports replicated storage across multiple servers. It enables powerful mechanisms such as atomic commits, automatic partitioning (replication), and many more features that are crucial for any distributed application. Steampipe is a distributed SQL engine designed for cloud native applications and designed for horizontal scalability. Some of the most popular Go Cloud Database libraries among developers are
The JavaScript Cloud Database libraries can be used with any database that is supported by the USENET protocol (TCP/IP). It supports SQL Server, MySQL and PostgreSQL databases. These libraries are a great way to store data in the cloud. You can use these libraries to store your data and retrieve it later when you need it. ToolJet is a JavaScript Cloud Database library that provides a fully managed service for working with databases. The service includes tools for creating, migrating, and managing databases from the cloud. It also supports using SQL as well as other programming languages such as JavaScript and Python.sqlpad is a JavaScript library that allows you to quickly build scalable, real-time web applications. It's free and open source. node-gcm is a NodeJS library that allows you to communicate with Google Cloud Datastore from nodejs applications without any external dependencies or server side code. There are several popular open source JavaScript Cloud Database libraries available for developers
JavaScript Database libraries like lowdb, pouchdb, nedb are used in front end web development. They are used to store data on HTML5 local storage and WebSQL storage. The most important thing is that you should use a JavaScript database library which is cross browser compatible. They’re designed to be easily integrated into any project and they can be used as a replacement for traditional database solutions. LowDB is a JavaScript database library with built-in support for the Low-Level API. It's easy to use and supports many of the features that you would expect from a relational database. It also has great documentation and community support. PouchDB is another JavaScript database library that was built to be as fast as possible. It uses indexing to speed up queries and index data efficiently. It also has great documentation and community support. Nedb is another pure JavaScript alternative to MySQL that works in NodeJS environments, but can also be used in web browsers without external dependencies (e.g., Socket.io). Many developers depend on the following open source JavaScript Database libraries
JavaScript search engine libraries can be used to create custom search engines. These search engine libraries can be used to create custom search engines. They are easy to install and use, and they have a simple code base that you can customize according to your needs. Some of the most popular JavaScript search engine libraries include Algolia, Google Autocomplete, etc. Jets.js is a JavaScript library which allows developers to easily create their own search engine using Express and Elasticsearch. It supports all major browsers including IE8+, Firefox, Chrome, Safari and Opera. Jets helps developers implement common features like autocomplete and autocapitalization in their applications using a simple API. ambar is a jQuery-based library that uses Google's Custom Search Engine for results, but it also allows you to use other engines such as Bing, Yahoo!, DuckDuckGo, etc... It also comes with support for highlighting matches in the page content textarea element which makes it more user-friendly than other libraries. The following is a comprehensive list of the best open source JavaScript search engine libraries.
Trending Discussions on Database
Javascript dynamically inserted later on: how to make it run?
Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
AngularFireModule and AngularFireDatabaseModule not being found in @angular/fire
ASP.NET Core 6 how to access Configuration during startup
How to fix: "@angular/fire"' has no exported member 'AngularFireModule'.ts(2305) ionic, firebase, angular
pymongo [SSL: CERTIFICATE_VERIFY_FAILED]: certificate has expired on Mongo Atlas
java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): ,
How to solve FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore problem?
How do I get details of a veracode vulnerability report?
QUESTION
Javascript dynamically inserted later on: how to make it run?
Asked 2022-Apr-17 at 14:12I have scripts In my React app that are inserted dynamically later on. The scripts don't load.
In my database there is a field called content
, which contains data that includes html and javascript. There are many records and each record can include multiple scripts in the content
field. So it's not really an option to statically specify each of the script-urls in my React app. The field for a record could for example look like:
1<p>Some text and html</p>
2<div id="xxx_hype_container">
3 <script type="text/javascript" charset="utf-8" src="https://example.com/uploads/hype_generated_script.js?499892"></script>
4</div>
5<div style="display: none;" aria-hidden="true">
6<div>Some text.</div>
7Etc…
8
I call on this field in my React app using dangerouslySetInnerHTML
:
1<p>Some text and html</p>
2<div id="xxx_hype_container">
3 <script type="text/javascript" charset="utf-8" src="https://example.com/uploads/hype_generated_script.js?499892"></script>
4</div>
5<div style="display: none;" aria-hidden="true">
6<div>Some text.</div>
7Etc…
8render() {
9 return (
10 <div data-page="clarifies">
11 <div className="container">
12 <div dangerouslySetInnerHTML={{ __html: post.content }} />
13 ... some other data
14 </div>
15 </div>
16 );
17}
18
It correctly loads the data from the database and displays the html from that data. However, the Javascript does not get executed. I think the script doesn't work because it is dynamically inserted later on. How can I make these scripts work/run?
This post suggest a solution for dynamically inserted scripts, but I don't think I can apply this solution because in my case the script/code is inserted from a database (so how to then use nodeScriptReplace
on the code...?). Any suggestions how I might make my scripts work?
Update in response to @lissettdm their answer:
1<p>Some text and html</p>
2<div id="xxx_hype_container">
3 <script type="text/javascript" charset="utf-8" src="https://example.com/uploads/hype_generated_script.js?499892"></script>
4</div>
5<div style="display: none;" aria-hidden="true">
6<div>Some text.</div>
7Etc…
8render() {
9 return (
10 <div data-page="clarifies">
11 <div className="container">
12 <div dangerouslySetInnerHTML={{ __html: post.content }} />
13 ... some other data
14 </div>
15 </div>
16 );
17}
18constructor(props) {
19 this.ref = React.createRef();
20}
21
22componentDidUpdate(prevProps, prevState) {
23 if (prevProps.postData !== this.props.postData) {
24 this.setState({
25 loading: false,
26 post: this.props.postData.data,
27 //etc
28 });
29 setTimeout(() => parseElements());
30
31 console.log(this.props.postData.data.content);
32 // returns html string like: `<div id="hype_container" style="margin: auto; etc.`
33 const node = document.createRange().createContextualFragment(this.props.postData.data.content);
34 console.log(JSON.stringify(this.ref));
35 // returns {"current":null}
36 console.log(node);
37 // returns [object DocumentFragment]
38 this.ref.current.appendChild(node);
39 // produces error "Cannot read properties of null"
40 }
41}
42
43render() {
44 const { history } = this.props;
45 /etc.
46 return (
47 {loading ? (
48 some code
49 ) : (
50 <div data-page="clarifies">
51 <div className="container">
52 <div ref={this.ref}></div>
53 ... some other data
54 </div>
55 </div>
56 );
57 );
58}
59
The this.ref.current.appendChild(node);
line produces the error:
TypeError: Cannot read properties of null (reading 'appendChild')
ANSWER
Answered 2022-Apr-14 at 19:05Rendering raw HTML without React recommended method is not a good practice. React recommends method dangerouslySetInnerHTML to render raw HTML.
QUESTION
Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro
Asked 2022-Apr-04 at 18:41I'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)
ANSWER
Answered 2022-Apr-04 at 18:41To solve this on a Apple Silicon M1 I found three options
AUse 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
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
QUESTION
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Asked 2022-Apr-04 at 15:46Not really sure what caused this but most likely exiting the terminal while my rails server which was connected to PostgreSQL database was closed (not a good practice I know but lesson learned!)
I've already tried the following:
- Rebooting my machine (using MBA M1 2020)
- Restarting PostgreSQL using homebrew
brew services restart postgresql
- Re-installing PostgreSQL using Homebrew
- Updating PostgreSQL using Homebrew
- I also tried following this link but when I run
cd Library/Application\ Support/Postgres
terminal tells me Postgres folder doesn't exist, so I'm kind of lost already. Although I have a feeling that deleting postmaster.pid would really fix my issue. Any help would be appreciated!
ANSWER
Answered 2022-Jan-13 at 15:19My original answer only included the troubleshooting steps below, and a workaround. I now decided to properly fix it via brute force by removing all clusters and reinstalling, since I didn't have any data there to keep. It was something along these lines, on my Ubuntu 21.04 system:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6
Now I have:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9
And sudo -u postgres psql
works fine. The service was started automatically but it can be done manually with sudo systemctl start postgresql
.
Incidentally, I can recommend the PostgreSQL docker image, which eliminates the need to bother with a local installation.
TroubleshootingAlthough I cannot provide an answer to your specific problem, I thought I'd share my troubleshooting steps, hoping that it might be of some help. It seems that you are on Mac, whereas I am running Ubuntu 21.04, so expect things to be different.
This is a client connection problem, as noted by section 19.3.2 in the docs.
The directory in my error message is different:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12
I checked what unix sockets I had in that directory:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12$ ls -lah /var/run/postgresql/
13total 8.0K
14drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
15drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
16drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
17drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
18-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
19srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
20-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
21
Makes sense, there is a socket for 5433 not 5432. I confirmed this by running:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12$ ls -lah /var/run/postgresql/
13total 8.0K
14drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
15drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
16drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
17drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
18-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
19srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
20-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
21$ pg_lsclusters
22Ver Cluster Port Status Owner Data directory Log file
2312 main 5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
2414 main 5433 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
25
This explains how it got into this mess on my system. The default port is 5432, but after I upgraded from version 12 to 14, the server was setup to listen to 5433, presumably because it considered 5432 as already taken. Two alternatives here, get the server to listen on 5432 which is the client's default, or get the client to use 5433.
Let's try it by changing the client's parameters:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12$ ls -lah /var/run/postgresql/
13total 8.0K
14drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
15drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
16drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
17drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
18-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
19srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
20-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
21$ pg_lsclusters
22Ver Cluster Port Status Owner Data directory Log file
2312 main 5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
2414 main 5433 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
25$ sudo su postgres -c "psql --port=5433"
26psql (14.0 (Ubuntu 14.0-1.pgdg21.04+1))
27Type "help" for help.
28
29postgres=#
30
It worked! Now, to make it permanent I'm supposed to put this setting on a psqlrc
or ~/.psqlrc
file. The thin documentation on this (under "Files") was not helpful to me as I was not sure on the syntax and my attempts did not change the client's default, so I moved on.
To change the server I looked for the postgresql.conf
mentioned in the documentation but could not find the file. I did however see /var/lib/postgresql/14/main/postgresql.auto.conf
so I created it on the same directory with the content:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12$ ls -lah /var/run/postgresql/
13total 8.0K
14drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
15drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
16drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
17drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
18-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
19srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
20-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
21$ pg_lsclusters
22Ver Cluster Port Status Owner Data directory Log file
2312 main 5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
2414 main 5433 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
25$ sudo su postgres -c "psql --port=5433"
26psql (14.0 (Ubuntu 14.0-1.pgdg21.04+1))
27Type "help" for help.
28
29postgres=#
30port = 5432
31
Restarted the server: sudo systemctl restart postgresql
But the error persisted because, as the logs confirmed, the port did not change:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12$ ls -lah /var/run/postgresql/
13total 8.0K
14drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
15drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
16drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
17drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
18-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
19srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
20-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
21$ pg_lsclusters
22Ver Cluster Port Status Owner Data directory Log file
2312 main 5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
2414 main 5433 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
25$ sudo su postgres -c "psql --port=5433"
26psql (14.0 (Ubuntu 14.0-1.pgdg21.04+1))
27Type "help" for help.
28
29postgres=#
30port = 5432
31$ tail /var/log/postgresql/postgresql-14-main.log
32...
332021-10-29 16:36:12.195 UTC [25236] LOG: listening on IPv4 address "127.0.0.1", port 5433
342021-10-29 16:36:12.198 UTC [25236] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5433"
352021-10-29 16:36:12.204 UTC [25237] LOG: database system was shut down at 2021-10-29 16:36:12 UTC
362021-10-29 16:36:12.210 UTC [25236] LOG: database system is ready to accept connections
37
After other attempts did not succeed, I eventually decided to use a workaround: to redirect the client's requests on 5432 to 5433:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12$ ls -lah /var/run/postgresql/
13total 8.0K
14drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
15drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
16drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
17drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
18-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
19srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
20-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
21$ pg_lsclusters
22Ver Cluster Port Status Owner Data directory Log file
2312 main 5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
2414 main 5433 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
25$ sudo su postgres -c "psql --port=5433"
26psql (14.0 (Ubuntu 14.0-1.pgdg21.04+1))
27Type "help" for help.
28
29postgres=#
30port = 5432
31$ tail /var/log/postgresql/postgresql-14-main.log
32...
332021-10-29 16:36:12.195 UTC [25236] LOG: listening on IPv4 address "127.0.0.1", port 5433
342021-10-29 16:36:12.198 UTC [25236] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5433"
352021-10-29 16:36:12.204 UTC [25237] LOG: database system was shut down at 2021-10-29 16:36:12 UTC
362021-10-29 16:36:12.210 UTC [25236] LOG: database system is ready to accept connections
37ln -s /var/run/postgresql/.s.PGSQL.5433 /var/run/postgresql/.s.PGSQL.5432
38
This is what I have now:
1sudo pg_dropcluster --stop 12 main
2sudo pg_dropcluster --stop 14 main
3sudo apt remove postgresql-14
4sudo apt purge postgresql*
5sudo apt install postgresql-14
6$ pg_lsclusters
7Ver Cluster Port Status Owner Data directory Log file
814 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
9$ sudo su postgres -c "psql"
10psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
11 Is the server running locally and accepting connections on that socket?
12$ ls -lah /var/run/postgresql/
13total 8.0K
14drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
15drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
16drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
17drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
18-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
19srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
20-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
21$ pg_lsclusters
22Ver Cluster Port Status Owner Data directory Log file
2312 main 5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
2414 main 5433 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
25$ sudo su postgres -c "psql --port=5433"
26psql (14.0 (Ubuntu 14.0-1.pgdg21.04+1))
27Type "help" for help.
28
29postgres=#
30port = 5432
31$ tail /var/log/postgresql/postgresql-14-main.log
32...
332021-10-29 16:36:12.195 UTC [25236] LOG: listening on IPv4 address "127.0.0.1", port 5433
342021-10-29 16:36:12.198 UTC [25236] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5433"
352021-10-29 16:36:12.204 UTC [25237] LOG: database system was shut down at 2021-10-29 16:36:12 UTC
362021-10-29 16:36:12.210 UTC [25236] LOG: database system is ready to accept connections
37ln -s /var/run/postgresql/.s.PGSQL.5433 /var/run/postgresql/.s.PGSQL.5432
38$ ls -lah /var/run/postgresql/
39total 8.0K
40drwxrwsr-x 4 postgres postgres 160 Oct 29 16:40 .
41drwxr-xr-x 36 root root 1.1K Oct 29 14:08 ..
42drwxr-s--- 2 postgres postgres 40 Oct 29 14:33 12-main.pg_stat_tmp
43drwxr-s--- 2 postgres postgres 120 Oct 29 16:59 14-main.pg_stat_tmp
44-rw-r--r-- 1 postgres postgres 6 Oct 29 16:36 14-main.pid
45lrwxrwxrwx 1 postgres postgres 33 Oct 29 16:40 .s.PGSQL.5432 -> /var/run/postgresql/.s.PGSQL.5433
46srwxrwxrwx 1 postgres postgres 0 Oct 29 16:36 .s.PGSQL.5433
47-rw------- 1 postgres postgres 70 Oct 29 16:36 .s.PGSQL.5433.lock
48
This means I can now just run psql
without having to explicitly set the port to 5433. Now, this is a hack and I would not recommend it. But in my development system I am happy with it for now, because I don't have more time to spend on this. This is why I shared the steps and the links so that you can find a proper solution for your case.
QUESTION
AngularFireModule and AngularFireDatabaseModule not being found in @angular/fire
Asked 2022-Apr-01 at 12:56I am trying to implement Firebase Realtime Database into a angular project and Im getting stuck at one of the very first steps. Importing AngularFireModule and AngularFireDatabaseModule. It gives me the following error:
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3
And here is how I am importing them:
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5
Am I missing something here? I have installed @angular/fire via the command
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6
and have also installed firebase tools. Here is a list of the Angular packages I currently have installed and their versions:
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package Version
16---------------------------------------------------------
17@angular-devkit/architect 0.1202.2
18@angular-devkit/build-angular 12.2.2
19@angular-devkit/core 12.2.2
20@angular-devkit/schematics 12.2.2
21@angular/cli 12.2.2
22@angular/fire 7.0.0
23@schematics/angular 12.2.2
24rxjs 6.6.7
25typescript 4.3.5
26
I do apologise if this is all excessive information but I am completely stuck as to what the issue is. Any help would be GREATLY appreciated. Right now my suspicion is that its a compatibility issue or perhaps a feature that doesnt exist anymore on the latest versions but I really dont know.
ANSWER
Answered 2021-Aug-26 at 13:20AngularFire 7.0.0 was launched yesterday with a new API that has a lot of bundle size reduction benefits.
Instead of top level classes like AngularFireDatabase
, you can now import smaller independent functions.
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package Version
16---------------------------------------------------------
17@angular-devkit/architect 0.1202.2
18@angular-devkit/build-angular 12.2.2
19@angular-devkit/core 12.2.2
20@angular-devkit/schematics 12.2.2
21@angular/cli 12.2.2
22@angular/fire 7.0.0
23@schematics/angular 12.2.2
24rxjs 6.6.7
25typescript 4.3.5
26import { list } from '@angular/fire/database';
27
The initialization process is a bit different too as it has a more flexible API for specifying configurations.
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package Version
16---------------------------------------------------------
17@angular-devkit/architect 0.1202.2
18@angular-devkit/build-angular 12.2.2
19@angular-devkit/core 12.2.2
20@angular-devkit/schematics 12.2.2
21@angular/cli 12.2.2
22@angular/fire 7.0.0
23@schematics/angular 12.2.2
24rxjs 6.6.7
25typescript 4.3.5
26import { list } from '@angular/fire/database';
27@NgModule({
28 imports: [
29 provideFirebaseApp(() => initializeApp(config)),
30 provideFirestore(() => {
31 const firestore = getFirestore();
32 connectEmulator(firestore, 'localhost', 8080);
33 enableIndexedDbPersistence(firestore);
34 return firestore;
35 }),
36 provideStorage(() => getStorage()),
37 ],
38})
39
If you want to proceed with the older API there's a compatibility layer.
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package Version
16---------------------------------------------------------
17@angular-devkit/architect 0.1202.2
18@angular-devkit/build-angular 12.2.2
19@angular-devkit/core 12.2.2
20@angular-devkit/schematics 12.2.2
21@angular/cli 12.2.2
22@angular/fire 7.0.0
23@schematics/angular 12.2.2
24rxjs 6.6.7
25typescript 4.3.5
26import { list } from '@angular/fire/database';
27@NgModule({
28 imports: [
29 provideFirebaseApp(() => initializeApp(config)),
30 provideFirestore(() => {
31 const firestore = getFirestore();
32 connectEmulator(firestore, 'localhost', 8080);
33 enableIndexedDbPersistence(firestore);
34 return firestore;
35 }),
36 provideStorage(() => getStorage()),
37 ],
38})
39import { AngularFireModule} from '@angular/fire/compat'
40import { AngularFireDatabaseModule } from '@angular/fire/compat/database';
41
QUESTION
ASP.NET Core 6 how to access Configuration during startup
Asked 2022-Mar-08 at 11:45In earlier versions, we had Startup.cs class and we get configuration object as follows in the Startup file.
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23
Now in .NET 6 (With Visual Studio 2022), we don't see the Startup.cs class. Looks like its days are numbered. So how do we get these objects like Configuration(IConfiguration) and Hosting Environment(IHostEnvironment)
How do we get these objects, to say read the configuration from appsettings? Currently the Program.cs file looks like this.
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23using Festify.Database;
24using Microsoft.EntityFrameworkCore;
25
26var builder = WebApplication.CreateBuilder(args);
27
28// Add services to the container.
29builder.Services.AddRazorPages();
30
31builder.Services.AddDbContext<FestifyContext>();
32
33
34////////////////////////////////////////////////
35// The following is Giving me error as Configuration
36// object is not avaible, I dont know how to inject this here.
37////////////////////////////////////////////////
38
39
40builder.Services.AddDbContext<FestifyContext>(opt =>
41 opt.UseSqlServer(
42 Configuration.GetConnectionString("Festify")));
43
44
45var app = builder.Build();
46
47// Configure the HTTP request pipeline.
48if (!app.Environment.IsDevelopment())
49{
50 app.UseExceptionHandler("/Error");
51 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
52 app.UseHsts();
53}
54
55app.UseHttpsRedirection();
56app.UseStaticFiles();
57
58app.UseRouting();
59
60app.UseAuthorization();
61
62app.MapRazorPages();
63
64app.Run();
65
I want to know how to read the configuration from appsettings.json ?
ANSWER
Answered 2021-Oct-26 at 12:26WebApplicationBuilder
returned by WebApplication.CreateBuilder(args)
exposes Configuration
and Environment
properties:
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23using Festify.Database;
24using Microsoft.EntityFrameworkCore;
25
26var builder = WebApplication.CreateBuilder(args);
27
28// Add services to the container.
29builder.Services.AddRazorPages();
30
31builder.Services.AddDbContext<FestifyContext>();
32
33
34////////////////////////////////////////////////
35// The following is Giving me error as Configuration
36// object is not avaible, I dont know how to inject this here.
37////////////////////////////////////////////////
38
39
40builder.Services.AddDbContext<FestifyContext>(opt =>
41 opt.UseSqlServer(
42 Configuration.GetConnectionString("Festify")));
43
44
45var app = builder.Build();
46
47// Configure the HTTP request pipeline.
48if (!app.Environment.IsDevelopment())
49{
50 app.UseExceptionHandler("/Error");
51 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
52 app.UseHsts();
53}
54
55app.UseHttpsRedirection();
56app.UseStaticFiles();
57
58app.UseRouting();
59
60app.UseAuthorization();
61
62app.MapRazorPages();
63
64app.Run();
65var builder = WebApplication.CreateBuilder(args);
66
67// Add services to the container.
68...
69ConfigurationManager configuration = builder.Configuration;
70IWebHostEnvironment environment = builder.Environment;
71
WebApplication
returned by WebApplicationBuilder.Build()
also exposes Configuration
and Environment
:
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23using Festify.Database;
24using Microsoft.EntityFrameworkCore;
25
26var builder = WebApplication.CreateBuilder(args);
27
28// Add services to the container.
29builder.Services.AddRazorPages();
30
31builder.Services.AddDbContext<FestifyContext>();
32
33
34////////////////////////////////////////////////
35// The following is Giving me error as Configuration
36// object is not avaible, I dont know how to inject this here.
37////////////////////////////////////////////////
38
39
40builder.Services.AddDbContext<FestifyContext>(opt =>
41 opt.UseSqlServer(
42 Configuration.GetConnectionString("Festify")));
43
44
45var app = builder.Build();
46
47// Configure the HTTP request pipeline.
48if (!app.Environment.IsDevelopment())
49{
50 app.UseExceptionHandler("/Error");
51 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
52 app.UseHsts();
53}
54
55app.UseHttpsRedirection();
56app.UseStaticFiles();
57
58app.UseRouting();
59
60app.UseAuthorization();
61
62app.MapRazorPages();
63
64app.Run();
65var builder = WebApplication.CreateBuilder(args);
66
67// Add services to the container.
68...
69ConfigurationManager configuration = builder.Configuration;
70IWebHostEnvironment environment = builder.Environment;
71var app = builder.Build();
72IConfiguration configuration = app.Configuration;
73IWebHostEnvironment environment = app.Environment;
74
Also check the migration guide and code samples.
QUESTION
How to fix: "@angular/fire"' has no exported member 'AngularFireModule'.ts(2305) ionic, firebase, angular
Asked 2022-Feb-11 at 07:31I'm trying to connect my app with a firebase db, but I receive 4 error messages on app.module.ts:
1'"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305),
2'"@angular/fire/storage"' has no exported member 'AngularFireStorageModule'.ts(2305)
3'"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.ts(2305)
4'"@angular/fire/auth"' has no exported member 'AngularFireAuthModule'.ts(2305)
5
here is my package.json file:
1'"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305),
2'"@angular/fire/storage"' has no exported member 'AngularFireStorageModule'.ts(2305)
3'"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.ts(2305)
4'"@angular/fire/auth"' has no exported member 'AngularFireAuthModule'.ts(2305)
5{
6 "name": "gescable",
7 "version": "0.0.1",
8 "author": "Ionic Framework",
9 "homepage": "https://ionicframework.com/",
10 "scripts": {
11 "ng": "ng",
12 "start": "ng serve",
13 "build": "ng build",
14 "test": "ng test",
15 "lint": "ng lint",
16 "e2e": "ng e2e"
17 },
18 "private": true,
19 "dependencies": {
20 "@angular-devkit/architect": "^0.1202.5",
21 "@angular-devkit/architect-cli": "^0.1202.5",
22 "@angular/common": "~12.1.1",
23 "@angular/core": "~12.1.1",
24 "@angular/fire": "^7.0.4",
25 "@angular/forms": "~12.1.1",
26 "@angular/platform-browser": "~12.1.1",
27 "@angular/platform-browser-dynamic": "~12.1.1",
28 "@angular/router": "~12.1.1",
29 "@ionic/angular": "^5.5.2",
30 "ajv": "^8.6.2",
31 "angularfire2": "^5.4.2",
32 "firebase": "^7.24.0",
33 "rxfire": "^6.0.0",
34 "rxjs": "~6.6.0",
35 "tslib": "^2.2.0",
36 "zone.js": "~0.11.4"
37 },
38 "devDependencies": {
39 "@angular-devkit/build-angular": "~12.1.1",
40 "@angular-eslint/builder": "~12.0.0",
41 "@angular-eslint/eslint-plugin": "~12.0.0",
42 "@angular-eslint/eslint-plugin-template": "~12.0.0",
43 "@angular-eslint/template-parser": "~12.0.0",
44 "@angular/cli": "~12.1.1",
45 "@angular/compiler": "~12.1.1",
46 "@angular/compiler-cli": "~12.1.1",
47 "@angular/language-service": "~12.0.1",
48 "@ionic/angular-toolkit": "^4.0.0",
49 "@types/jasmine": "~3.6.0",
50 "@types/jasminewd2": "~2.0.3",
51 "@types/node": "^12.11.1",
52 "@typescript-eslint/eslint-plugin": "4.16.1",
53 "@typescript-eslint/parser": "4.16.1",
54 "eslint": "^7.6.0",
55 "eslint-plugin-import": "2.22.1",
56 "eslint-plugin-jsdoc": "30.7.6",
57 "eslint-plugin-prefer-arrow": "1.2.2",
58 "jasmine-core": "~3.8.0",
59 "jasmine-spec-reporter": "~5.0.0",
60 "karma": "~6.3.2",
61 "karma-chrome-launcher": "~3.1.0",
62 "karma-coverage": "~2.0.3",
63 "karma-coverage-istanbul-reporter": "~3.0.2",
64 "karma-jasmine": "~4.0.0",
65 "karma-jasmine-html-reporter": "^1.5.0",
66 "protractor": "~7.0.0",
67 "ts-node": "~8.3.0",
68 "typescript": "~4.2.4",
69 "@angular-devkit/architect": "^0.1200.0",
70 "firebase-tools": "^9.0.0",
71 "fuzzy": "^0.1.3",
72 "inquirer": "^6.2.2",
73 "inquirer-autocomplete-prompt": "^1.0.1",
74 "open": "^7.0.3",
75 "jsonc-parser": "^3.0.0"
76 },
77 "description": "An Ionic project"
78}
79
And here is my app.module.ts:
1'"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305),
2'"@angular/fire/storage"' has no exported member 'AngularFireStorageModule'.ts(2305)
3'"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.ts(2305)
4'"@angular/fire/auth"' has no exported member 'AngularFireAuthModule'.ts(2305)
5{
6 "name": "gescable",
7 "version": "0.0.1",
8 "author": "Ionic Framework",
9 "homepage": "https://ionicframework.com/",
10 "scripts": {
11 "ng": "ng",
12 "start": "ng serve",
13 "build": "ng build",
14 "test": "ng test",
15 "lint": "ng lint",
16 "e2e": "ng e2e"
17 },
18 "private": true,
19 "dependencies": {
20 "@angular-devkit/architect": "^0.1202.5",
21 "@angular-devkit/architect-cli": "^0.1202.5",
22 "@angular/common": "~12.1.1",
23 "@angular/core": "~12.1.1",
24 "@angular/fire": "^7.0.4",
25 "@angular/forms": "~12.1.1",
26 "@angular/platform-browser": "~12.1.1",
27 "@angular/platform-browser-dynamic": "~12.1.1",
28 "@angular/router": "~12.1.1",
29 "@ionic/angular": "^5.5.2",
30 "ajv": "^8.6.2",
31 "angularfire2": "^5.4.2",
32 "firebase": "^7.24.0",
33 "rxfire": "^6.0.0",
34 "rxjs": "~6.6.0",
35 "tslib": "^2.2.0",
36 "zone.js": "~0.11.4"
37 },
38 "devDependencies": {
39 "@angular-devkit/build-angular": "~12.1.1",
40 "@angular-eslint/builder": "~12.0.0",
41 "@angular-eslint/eslint-plugin": "~12.0.0",
42 "@angular-eslint/eslint-plugin-template": "~12.0.0",
43 "@angular-eslint/template-parser": "~12.0.0",
44 "@angular/cli": "~12.1.1",
45 "@angular/compiler": "~12.1.1",
46 "@angular/compiler-cli": "~12.1.1",
47 "@angular/language-service": "~12.0.1",
48 "@ionic/angular-toolkit": "^4.0.0",
49 "@types/jasmine": "~3.6.0",
50 "@types/jasminewd2": "~2.0.3",
51 "@types/node": "^12.11.1",
52 "@typescript-eslint/eslint-plugin": "4.16.1",
53 "@typescript-eslint/parser": "4.16.1",
54 "eslint": "^7.6.0",
55 "eslint-plugin-import": "2.22.1",
56 "eslint-plugin-jsdoc": "30.7.6",
57 "eslint-plugin-prefer-arrow": "1.2.2",
58 "jasmine-core": "~3.8.0",
59 "jasmine-spec-reporter": "~5.0.0",
60 "karma": "~6.3.2",
61 "karma-chrome-launcher": "~3.1.0",
62 "karma-coverage": "~2.0.3",
63 "karma-coverage-istanbul-reporter": "~3.0.2",
64 "karma-jasmine": "~4.0.0",
65 "karma-jasmine-html-reporter": "^1.5.0",
66 "protractor": "~7.0.0",
67 "ts-node": "~8.3.0",
68 "typescript": "~4.2.4",
69 "@angular-devkit/architect": "^0.1200.0",
70 "firebase-tools": "^9.0.0",
71 "fuzzy": "^0.1.3",
72 "inquirer": "^6.2.2",
73 "inquirer-autocomplete-prompt": "^1.0.1",
74 "open": "^7.0.3",
75 "jsonc-parser": "^3.0.0"
76 },
77 "description": "An Ionic project"
78}
79import { NgModule } from '@angular/core';
80import { BrowserModule } from '@angular/platform-browser';
81import { RouteReuseStrategy } from '@angular/router';
82import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
83import { AppRoutingModule } from './app-routing.module';
84import { AppComponent } from './app.component';
85import { ClientPageModule } from './client/client.module';
86import { environment } from '../environments/environment';
87import { AngularFireModule } from '@angular/fire';
88import { AngularFireAuthModule } from '@angular/fire/auth';
89import { AngularFireStorageModule } from '@angular/fire/storage';
90import { AngularFireDatabaseModule } from '@angular/fire/database';
91
92@NgModule({
93 declarations: [AppComponent],
94 entryComponents: [],
95 imports: [
96 BrowserModule,
97 IonicModule.forRoot(),
98 AppRoutingModule,
99 ClientPageModule,
100 AngularFireModule.initializeApp(environment.firebaseConfig),
101 AngularFireAuthModule,
102 AngularFireStorageModule,
103 AngularFireDatabaseModule
104 ],
105 providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
106 bootstrap: [AppComponent],
107})
108export class AppModule {}
109
Here is my tsonfig.ts file
1'"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305),
2'"@angular/fire/storage"' has no exported member 'AngularFireStorageModule'.ts(2305)
3'"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.ts(2305)
4'"@angular/fire/auth"' has no exported member 'AngularFireAuthModule'.ts(2305)
5{
6 "name": "gescable",
7 "version": "0.0.1",
8 "author": "Ionic Framework",
9 "homepage": "https://ionicframework.com/",
10 "scripts": {
11 "ng": "ng",
12 "start": "ng serve",
13 "build": "ng build",
14 "test": "ng test",
15 "lint": "ng lint",
16 "e2e": "ng e2e"
17 },
18 "private": true,
19 "dependencies": {
20 "@angular-devkit/architect": "^0.1202.5",
21 "@angular-devkit/architect-cli": "^0.1202.5",
22 "@angular/common": "~12.1.1",
23 "@angular/core": "~12.1.1",
24 "@angular/fire": "^7.0.4",
25 "@angular/forms": "~12.1.1",
26 "@angular/platform-browser": "~12.1.1",
27 "@angular/platform-browser-dynamic": "~12.1.1",
28 "@angular/router": "~12.1.1",
29 "@ionic/angular": "^5.5.2",
30 "ajv": "^8.6.2",
31 "angularfire2": "^5.4.2",
32 "firebase": "^7.24.0",
33 "rxfire": "^6.0.0",
34 "rxjs": "~6.6.0",
35 "tslib": "^2.2.0",
36 "zone.js": "~0.11.4"
37 },
38 "devDependencies": {
39 "@angular-devkit/build-angular": "~12.1.1",
40 "@angular-eslint/builder": "~12.0.0",
41 "@angular-eslint/eslint-plugin": "~12.0.0",
42 "@angular-eslint/eslint-plugin-template": "~12.0.0",
43 "@angular-eslint/template-parser": "~12.0.0",
44 "@angular/cli": "~12.1.1",
45 "@angular/compiler": "~12.1.1",
46 "@angular/compiler-cli": "~12.1.1",
47 "@angular/language-service": "~12.0.1",
48 "@ionic/angular-toolkit": "^4.0.0",
49 "@types/jasmine": "~3.6.0",
50 "@types/jasminewd2": "~2.0.3",
51 "@types/node": "^12.11.1",
52 "@typescript-eslint/eslint-plugin": "4.16.1",
53 "@typescript-eslint/parser": "4.16.1",
54 "eslint": "^7.6.0",
55 "eslint-plugin-import": "2.22.1",
56 "eslint-plugin-jsdoc": "30.7.6",
57 "eslint-plugin-prefer-arrow": "1.2.2",
58 "jasmine-core": "~3.8.0",
59 "jasmine-spec-reporter": "~5.0.0",
60 "karma": "~6.3.2",
61 "karma-chrome-launcher": "~3.1.0",
62 "karma-coverage": "~2.0.3",
63 "karma-coverage-istanbul-reporter": "~3.0.2",
64 "karma-jasmine": "~4.0.0",
65 "karma-jasmine-html-reporter": "^1.5.0",
66 "protractor": "~7.0.0",
67 "ts-node": "~8.3.0",
68 "typescript": "~4.2.4",
69 "@angular-devkit/architect": "^0.1200.0",
70 "firebase-tools": "^9.0.0",
71 "fuzzy": "^0.1.3",
72 "inquirer": "^6.2.2",
73 "inquirer-autocomplete-prompt": "^1.0.1",
74 "open": "^7.0.3",
75 "jsonc-parser": "^3.0.0"
76 },
77 "description": "An Ionic project"
78}
79import { NgModule } from '@angular/core';
80import { BrowserModule } from '@angular/platform-browser';
81import { RouteReuseStrategy } from '@angular/router';
82import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
83import { AppRoutingModule } from './app-routing.module';
84import { AppComponent } from './app.component';
85import { ClientPageModule } from './client/client.module';
86import { environment } from '../environments/environment';
87import { AngularFireModule } from '@angular/fire';
88import { AngularFireAuthModule } from '@angular/fire/auth';
89import { AngularFireStorageModule } from '@angular/fire/storage';
90import { AngularFireDatabaseModule } from '@angular/fire/database';
91
92@NgModule({
93 declarations: [AppComponent],
94 entryComponents: [],
95 imports: [
96 BrowserModule,
97 IonicModule.forRoot(),
98 AppRoutingModule,
99 ClientPageModule,
100 AngularFireModule.initializeApp(environment.firebaseConfig),
101 AngularFireAuthModule,
102 AngularFireStorageModule,
103 AngularFireDatabaseModule
104 ],
105 providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
106 bootstrap: [AppComponent],
107})
108export class AppModule {}
109 "compileOnSave": false,
110 "compilerOptions": {
111 "baseUrl": "./",
112 "outDir": "./dist/out-tsc",
113 "sourceMap": true,
114 "declaration": false,
115 "downlevelIteration": true,
116 "experimentalDecorators": true,
117 "moduleResolution": "node",
118 "importHelpers": true,
119 "target": "es2015",
120 "module": "es2020",
121 "lib": ["es2018", "dom"]
122 },
123 "angularCompilerOptions": {
124 "enableI18nLegacyMessageIdFormat": false,
125 "strictInjectionParameters": true,
126 "strictInputAccessModifiers": true,
127 "strictTemplates": true,
128 "skipLibCheck": true
129 }
130}
131
ANSWER
Answered 2021-Sep-10 at 12:47You need to add "compat" like this
1'"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305),
2'"@angular/fire/storage"' has no exported member 'AngularFireStorageModule'.ts(2305)
3'"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.ts(2305)
4'"@angular/fire/auth"' has no exported member 'AngularFireAuthModule'.ts(2305)
5{
6 "name": "gescable",
7 "version": "0.0.1",
8 "author": "Ionic Framework",
9 "homepage": "https://ionicframework.com/",
10 "scripts": {
11 "ng": "ng",
12 "start": "ng serve",
13 "build": "ng build",
14 "test": "ng test",
15 "lint": "ng lint",
16 "e2e": "ng e2e"
17 },
18 "private": true,
19 "dependencies": {
20 "@angular-devkit/architect": "^0.1202.5",
21 "@angular-devkit/architect-cli": "^0.1202.5",
22 "@angular/common": "~12.1.1",
23 "@angular/core": "~12.1.1",
24 "@angular/fire": "^7.0.4",
25 "@angular/forms": "~12.1.1",
26 "@angular/platform-browser": "~12.1.1",
27 "@angular/platform-browser-dynamic": "~12.1.1",
28 "@angular/router": "~12.1.1",
29 "@ionic/angular": "^5.5.2",
30 "ajv": "^8.6.2",
31 "angularfire2": "^5.4.2",
32 "firebase": "^7.24.0",
33 "rxfire": "^6.0.0",
34 "rxjs": "~6.6.0",
35 "tslib": "^2.2.0",
36 "zone.js": "~0.11.4"
37 },
38 "devDependencies": {
39 "@angular-devkit/build-angular": "~12.1.1",
40 "@angular-eslint/builder": "~12.0.0",
41 "@angular-eslint/eslint-plugin": "~12.0.0",
42 "@angular-eslint/eslint-plugin-template": "~12.0.0",
43 "@angular-eslint/template-parser": "~12.0.0",
44 "@angular/cli": "~12.1.1",
45 "@angular/compiler": "~12.1.1",
46 "@angular/compiler-cli": "~12.1.1",
47 "@angular/language-service": "~12.0.1",
48 "@ionic/angular-toolkit": "^4.0.0",
49 "@types/jasmine": "~3.6.0",
50 "@types/jasminewd2": "~2.0.3",
51 "@types/node": "^12.11.1",
52 "@typescript-eslint/eslint-plugin": "4.16.1",
53 "@typescript-eslint/parser": "4.16.1",
54 "eslint": "^7.6.0",
55 "eslint-plugin-import": "2.22.1",
56 "eslint-plugin-jsdoc": "30.7.6",
57 "eslint-plugin-prefer-arrow": "1.2.2",
58 "jasmine-core": "~3.8.0",
59 "jasmine-spec-reporter": "~5.0.0",
60 "karma": "~6.3.2",
61 "karma-chrome-launcher": "~3.1.0",
62 "karma-coverage": "~2.0.3",
63 "karma-coverage-istanbul-reporter": "~3.0.2",
64 "karma-jasmine": "~4.0.0",
65 "karma-jasmine-html-reporter": "^1.5.0",
66 "protractor": "~7.0.0",
67 "ts-node": "~8.3.0",
68 "typescript": "~4.2.4",
69 "@angular-devkit/architect": "^0.1200.0",
70 "firebase-tools": "^9.0.0",
71 "fuzzy": "^0.1.3",
72 "inquirer": "^6.2.2",
73 "inquirer-autocomplete-prompt": "^1.0.1",
74 "open": "^7.0.3",
75 "jsonc-parser": "^3.0.0"
76 },
77 "description": "An Ionic project"
78}
79import { NgModule } from '@angular/core';
80import { BrowserModule } from '@angular/platform-browser';
81import { RouteReuseStrategy } from '@angular/router';
82import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
83import { AppRoutingModule } from './app-routing.module';
84import { AppComponent } from './app.component';
85import { ClientPageModule } from './client/client.module';
86import { environment } from '../environments/environment';
87import { AngularFireModule } from '@angular/fire';
88import { AngularFireAuthModule } from '@angular/fire/auth';
89import { AngularFireStorageModule } from '@angular/fire/storage';
90import { AngularFireDatabaseModule } from '@angular/fire/database';
91
92@NgModule({
93 declarations: [AppComponent],
94 entryComponents: [],
95 imports: [
96 BrowserModule,
97 IonicModule.forRoot(),
98 AppRoutingModule,
99 ClientPageModule,
100 AngularFireModule.initializeApp(environment.firebaseConfig),
101 AngularFireAuthModule,
102 AngularFireStorageModule,
103 AngularFireDatabaseModule
104 ],
105 providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
106 bootstrap: [AppComponent],
107})
108export class AppModule {}
109 "compileOnSave": false,
110 "compilerOptions": {
111 "baseUrl": "./",
112 "outDir": "./dist/out-tsc",
113 "sourceMap": true,
114 "declaration": false,
115 "downlevelIteration": true,
116 "experimentalDecorators": true,
117 "moduleResolution": "node",
118 "importHelpers": true,
119 "target": "es2015",
120 "module": "es2020",
121 "lib": ["es2018", "dom"]
122 },
123 "angularCompilerOptions": {
124 "enableI18nLegacyMessageIdFormat": false,
125 "strictInjectionParameters": true,
126 "strictInputAccessModifiers": true,
127 "strictTemplates": true,
128 "skipLibCheck": true
129 }
130}
131import { AngularFireModule } from "@angular/fire/compat";
132import { AngularFireAuthModule } from "@angular/fire/compat/auth";
133import { AngularFireStorageModule } from '@angular/fire/compat/storage';
134import { AngularFirestoreModule } from '@angular/fire/compat/firestore';
135import { AngularFireDatabaseModule } from '@angular/fire/compat/database';
136
QUESTION
pymongo [SSL: CERTIFICATE_VERIFY_FAILED]: certificate has expired on Mongo Atlas
Asked 2022-Jan-29 at 22:03I am using MongoDB(Mongo Atlas) in my Django app. All was working fine till yesterday. But today, when I ran the server, it is showing me the following error on console
1Exception in thread django-main-thread:
2Traceback (most recent call last):
3 File "c:\users\admin\appdata\local\programs\python\python39\lib\threading.py", line 973, in _bootstrap_inner
4 self.run()
5 File "c:\users\admin\appdata\local\programs\python\python39\lib\threading.py", line 910, in run
6 self._target(*self._args, **self._kwargs)
7 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
8 fn(*args, **kwargs)
9 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run
10 self.check_migrations()
11 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\core\management\base.py", line 486, in check_migrations
12 executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
13 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\executor.py", line 18, in __init__
14 self.loader = MigrationLoader(self.connection)
15 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\loader.py", line 53, in __init__
16 self.build_graph()
17 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\loader.py", line 220, in build_graph
18 self.applied_migrations = recorder.applied_migrations()
19 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\recorder.py", line 77, in applied_migrations
20 if self.has_table():
21 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\recorder.py", line 56, in has_table
22 tables = self.connection.introspection.table_names(cursor)
23 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\backends\base\introspection.py", line 52, in table_names
24 return get_names(cursor)
25 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\backends\base\introspection.py", line 47, in get_names
26 return sorted(ti.name for ti in self.get_table_list(cursor)
27 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\djongo\introspection.py", line 47, in get_table_list
28 for c in cursor.db_conn.list_collection_names()
29 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\database.py", line 880, in list_collection_names
30 for result in self.list_collections(session=session, **kwargs)]
31 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\database.py", line 842, in list_collections
32 return self.__client._retryable_read(
33 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\mongo_client.py", line 1514, in _retryable_read
34 server = self._select_server(
35 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\mongo_client.py", line 1346, in _select_server
36 server = topology.select_server(server_selector)
37 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 244, in select_server
38 return random.choice(self.select_servers(selector,
39 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 202, in select_servers
40 server_descriptions = self._select_servers_loop(
41 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 218, in _select_servers_loop
42 raise ServerSelectionTimeoutError(
43pymongo.errors.ServerSelectionTimeoutError: cluster0-shard-00-02.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129),cluster0-shard-00-01.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129),cluster0-shard-00-00.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129), Timeout: 30s, Topology Description: <TopologyDescription id: 6155f0c9148b07ff5851a1b3, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('cluster0-shard-00-00.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-00.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>, <ServerDescription ('cluster0-shard-00-01.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-01.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>, <ServerDescription ('cluster0-shard-00-02.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-02.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>]>
44
I am using djongo as the database engine
1Exception in thread django-main-thread:
2Traceback (most recent call last):
3 File "c:\users\admin\appdata\local\programs\python\python39\lib\threading.py", line 973, in _bootstrap_inner
4 self.run()
5 File "c:\users\admin\appdata\local\programs\python\python39\lib\threading.py", line 910, in run
6 self._target(*self._args, **self._kwargs)
7 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
8 fn(*args, **kwargs)
9 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run
10 self.check_migrations()
11 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\core\management\base.py", line 486, in check_migrations
12 executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
13 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\executor.py", line 18, in __init__
14 self.loader = MigrationLoader(self.connection)
15 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\loader.py", line 53, in __init__
16 self.build_graph()
17 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\loader.py", line 220, in build_graph
18 self.applied_migrations = recorder.applied_migrations()
19 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\recorder.py", line 77, in applied_migrations
20 if self.has_table():
21 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\recorder.py", line 56, in has_table
22 tables = self.connection.introspection.table_names(cursor)
23 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\backends\base\introspection.py", line 52, in table_names
24 return get_names(cursor)
25 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\backends\base\introspection.py", line 47, in get_names
26 return sorted(ti.name for ti in self.get_table_list(cursor)
27 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\djongo\introspection.py", line 47, in get_table_list
28 for c in cursor.db_conn.list_collection_names()
29 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\database.py", line 880, in list_collection_names
30 for result in self.list_collections(session=session, **kwargs)]
31 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\database.py", line 842, in list_collections
32 return self.__client._retryable_read(
33 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\mongo_client.py", line 1514, in _retryable_read
34 server = self._select_server(
35 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\mongo_client.py", line 1346, in _select_server
36 server = topology.select_server(server_selector)
37 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 244, in select_server
38 return random.choice(self.select_servers(selector,
39 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 202, in select_servers
40 server_descriptions = self._select_servers_loop(
41 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 218, in _select_servers_loop
42 raise ServerSelectionTimeoutError(
43pymongo.errors.ServerSelectionTimeoutError: cluster0-shard-00-02.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129),cluster0-shard-00-01.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129),cluster0-shard-00-00.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129), Timeout: 30s, Topology Description: <TopologyDescription id: 6155f0c9148b07ff5851a1b3, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('cluster0-shard-00-00.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-00.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>, <ServerDescription ('cluster0-shard-00-01.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-01.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>, <ServerDescription ('cluster0-shard-00-02.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-02.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>]>
44DATABASES = {
45 'default': {
46 'ENGINE': 'djongo',
47 'NAME': 'DbName',
48 'ENFORCE_SCHEMA': False,
49 'CLIENT': {
50 'host': 'mongodb+srv://username:password@cluster0.mny7y.mongodb.net/DbName?retryWrites=true&w=majority'
51 }
52 }
53}
54
And following dependencies are being used in the app
1Exception in thread django-main-thread:
2Traceback (most recent call last):
3 File "c:\users\admin\appdata\local\programs\python\python39\lib\threading.py", line 973, in _bootstrap_inner
4 self.run()
5 File "c:\users\admin\appdata\local\programs\python\python39\lib\threading.py", line 910, in run
6 self._target(*self._args, **self._kwargs)
7 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
8 fn(*args, **kwargs)
9 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run
10 self.check_migrations()
11 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\core\management\base.py", line 486, in check_migrations
12 executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
13 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\executor.py", line 18, in __init__
14 self.loader = MigrationLoader(self.connection)
15 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\loader.py", line 53, in __init__
16 self.build_graph()
17 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\loader.py", line 220, in build_graph
18 self.applied_migrations = recorder.applied_migrations()
19 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\recorder.py", line 77, in applied_migrations
20 if self.has_table():
21 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\migrations\recorder.py", line 56, in has_table
22 tables = self.connection.introspection.table_names(cursor)
23 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\backends\base\introspection.py", line 52, in table_names
24 return get_names(cursor)
25 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\db\backends\base\introspection.py", line 47, in get_names
26 return sorted(ti.name for ti in self.get_table_list(cursor)
27 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\djongo\introspection.py", line 47, in get_table_list
28 for c in cursor.db_conn.list_collection_names()
29 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\database.py", line 880, in list_collection_names
30 for result in self.list_collections(session=session, **kwargs)]
31 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\database.py", line 842, in list_collections
32 return self.__client._retryable_read(
33 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\mongo_client.py", line 1514, in _retryable_read
34 server = self._select_server(
35 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\mongo_client.py", line 1346, in _select_server
36 server = topology.select_server(server_selector)
37 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 244, in select_server
38 return random.choice(self.select_servers(selector,
39 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 202, in select_servers
40 server_descriptions = self._select_servers_loop(
41 File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\pymongo\topology.py", line 218, in _select_servers_loop
42 raise ServerSelectionTimeoutError(
43pymongo.errors.ServerSelectionTimeoutError: cluster0-shard-00-02.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129),cluster0-shard-00-01.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129),cluster0-shard-00-00.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129), Timeout: 30s, Topology Description: <TopologyDescription id: 6155f0c9148b07ff5851a1b3, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('cluster0-shard-00-00.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-00.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>, <ServerDescription ('cluster0-shard-00-01.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-01.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>, <ServerDescription ('cluster0-shard-00-02.mny7y.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-02.mny7y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')>]>
44DATABASES = {
45 'default': {
46 'ENGINE': 'djongo',
47 'NAME': 'DbName',
48 'ENFORCE_SCHEMA': False,
49 'CLIENT': {
50 'host': 'mongodb+srv://username:password@cluster0.mny7y.mongodb.net/DbName?retryWrites=true&w=majority'
51 }
52 }
53}
54dj-database-url==0.5.0
55Django==3.2.5
56djangorestframework==3.12.4
57django-cors-headers==3.7.0
58gunicorn==20.1.0
59psycopg2==2.9.1
60pytz==2021.1
61whitenoise==5.3.0
62djongo==1.3.6
63dnspython==2.1.0
64
What should be done in order to resolve this error?
ANSWER
Answered 2021-Oct-03 at 05:57This is because of a root CA Let’s Encrypt uses (and Mongo Atals uses Let's Encrypt) has expired on 2020-09-30 - namely the "IdentTrust DST Root CA X3" one.
The fix is to manually install in the Windows certificate store the "ISRG Root X1" and "ISRG Root X2" root certificates, and the "Let’s Encrypt R3" intermediate one - link to their official site - https://letsencrypt.org/certificates/
Copy from the comments: download the .der field from the 1st category, download, double click and follow the wizard to install it.
QUESTION
java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): ,
Asked 2022-Jan-18 at 08:15i'm having a problem to publish my app on the play store after october 2021, the error says that the table media_store_extension
doesn't exist. The thing is: i don't use SQLITE on the project, so i have no idea what may be causing this exception.
The target sdk is 30, and de minimun is 26
The full error:
1FATAL EXCEPTION: latency_sensitive_executor-thread-1
2Process: com.google.android.apps.photos, PID: 29478
3java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension ORDER BY id DESC LIMIT 100 OFFSET 0
4 at nqo.a(PG:3)
5 at aleu.run(PG:6)
6 at krv.a(PG:17)
7 at krw.run(Unknown Source:6)
8 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
9 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
10 at java.lang.Thread.run(Thread.java:764)
11 at ksa.run(PG:5)
12Caused by: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension ORDER BY id DESC LIMIT 100 OFFSET 0
13 at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
14 at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:890)
15 at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:501)
16 at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
17 at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
18 at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
19 at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
20 at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1392)
21 at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1239)
22 at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
23 at agcm.a(PG:8)
24 at nnw.run(PG:17)
25 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
26 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
27 ... 4 more
28
ANSWER
Answered 2021-Nov-18 at 11:41This error is reported not only from Flutter developers, but also from Unity (https://forum.unity.com/threads/getting-an-odd-error-in-internal-android-build-after-updating-iap.1104352/ and https://forum.unity.com/threads/error-when-submitting-app-to-google-play.1098139/) and in my case - for a native android app.
We first got this error 6 months ago and applied the fix that was suggested by the unity guys:
1FATAL EXCEPTION: latency_sensitive_executor-thread-1
2Process: com.google.android.apps.photos, PID: 29478
3java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension ORDER BY id DESC LIMIT 100 OFFSET 0
4 at nqo.a(PG:3)
5 at aleu.run(PG:6)
6 at krv.a(PG:17)
7 at krw.run(Unknown Source:6)
8 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
9 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
10 at java.lang.Thread.run(Thread.java:764)
11 at ksa.run(PG:5)
12Caused by: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension ORDER BY id DESC LIMIT 100 OFFSET 0
13 at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
14 at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:890)
15 at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:501)
16 at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
17 at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
18 at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
19 at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
20 at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1392)
21 at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1239)
22 at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
23 at agcm.a(PG:8)
24 at nnw.run(PG:17)
25 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
26 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
27 ... 4 more
28aaptOptions {
29 noCompress 'db'
30 ...
31}
32
However, yesterday we received the same error again, so the "fix" did not work for us.
The error occurs:
- (so far) only during internal testing
- only on Xiaomi Redmi 6A.
- from time to time(it is not reproduced each time)
- always in process com.google.android.apps.photos
The most reasonable explanation that I have seen so far is that the exception occurs when the testing bot attempts to take a screenshot.
This explains why the process is Google Photos', why the error is not reproduced each time and why it is "fixed" by just resubmitting a new build.
This also means that just ignoring the error should be OK.
QUESTION
How to solve FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore problem?
Asked 2022-Jan-11 at 15:08I am trying to set up Firebase with next.js. I am getting this error in the console.
FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore
This is one of my custom hook
1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () => {
7 const [username, setUsername] = useState<string | null>(null)
8
9 const [currentUser, setCurrentUser] = useState<User | null>(null)
10
11 useEffect(() => {
12 let unsubscribe: void | Unsubscribe
13
14 onAuthStateChanged(auth, (user) => {
15 if (user) {
16 setCurrentUser(user)
17 // The Problem is inside this try blog
18 try {
19 // the onsnapshot function is causing the problem
20 console.log('firestore: ', fireStore)
21 unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) => {
22 setUsername(doc.data()?.username)
23 })
24 } catch (e) {
25 console.log(e.message)
26 }
27 } else {
28 setCurrentUser(null)
29 setUsername(null)
30 }
31 })
32
33 return unsubscribe
34 }, [currentUser])
35
36 return { currentUser, username }
37}
38
I also have this firebase.ts file where I initialized my firebase app
1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () => {
7 const [username, setUsername] = useState<string | null>(null)
8
9 const [currentUser, setCurrentUser] = useState<User | null>(null)
10
11 useEffect(() => {
12 let unsubscribe: void | Unsubscribe
13
14 onAuthStateChanged(auth, (user) => {
15 if (user) {
16 setCurrentUser(user)
17 // The Problem is inside this try blog
18 try {
19 // the onsnapshot function is causing the problem
20 console.log('firestore: ', fireStore)
21 unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) => {
22 setUsername(doc.data()?.username)
23 })
24 } catch (e) {
25 console.log(e.message)
26 }
27 } else {
28 setCurrentUser(null)
29 setUsername(null)
30 }
31 })
32
33 return unsubscribe
34 }, [currentUser])
35
36 return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44 apiKey: 'some-api',
45 authDomain: 'some-auth-domain',
46 projectId: 'some-project-id',
47 storageBucket: 'some-storage-bucket',
48 messagingSenderId: 'some-id',
49 appId: 'some-app-id',
50 measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56 firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
I don't know whether the problem is in the project initialization. I am pretty sure the error is generated from my custom hook file. I also found out that there must be something wrong with onSnapshot
function. Am I passing the docRef wrong or something? What am I doing wrong here?
The console.log(firestore)
log:
1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () => {
7 const [username, setUsername] = useState<string | null>(null)
8
9 const [currentUser, setCurrentUser] = useState<User | null>(null)
10
11 useEffect(() => {
12 let unsubscribe: void | Unsubscribe
13
14 onAuthStateChanged(auth, (user) => {
15 if (user) {
16 setCurrentUser(user)
17 // The Problem is inside this try blog
18 try {
19 // the onsnapshot function is causing the problem
20 console.log('firestore: ', fireStore)
21 unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) => {
22 setUsername(doc.data()?.username)
23 })
24 } catch (e) {
25 console.log(e.message)
26 }
27 } else {
28 setCurrentUser(null)
29 setUsername(null)
30 }
31 })
32
33 return unsubscribe
34 }, [currentUser])
35
36 return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44 apiKey: 'some-api',
45 authDomain: 'some-auth-domain',
46 projectId: 'some-project-id',
47 storageBucket: 'some-storage-bucket',
48 messagingSenderId: 'some-id',
49 appId: 'some-app-id',
50 measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56 firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65 type: "firestore-lite"
66 _app: FirebaseAppImpl
67 _automaticDataCollectionEnabled: false
68 _config: {name: "[DEFAULT]", automaticDataCollectionEnabled: false}
69 _container: ComponentContainer {name: "[DEFAULT]", providers: Map(15)}
70 _isDeleted: false
71 _name: "[DEFAULT]"
72 _options:
73 apiKey: 'some-api'
74 authDomain: 'some-auth-domain'
75 projectId: 'some-project-id'
76 storageBucket: 'some-storage-bucket'
77 messagingSenderId: 'some-id'
78 appId: 'some-app-id'
79 measurementId: 'some-measurement-id'
80 [[Prototype]]: Object
81 automaticDataCollectionEnabled: (...)
82 config: (...)
83 container: (...)
84 isDeleted: (...)
85 name: (...)
86 options: (...)
87 [[Prototype]]: Object
88 _credentials: Q {auth: AuthInterop}
89 _databaseId: H {projectId: "next-firebase-fireship", database: "(default)"}
90 _persistenceKey: "(lite)"
91 _settings: ee {host: "firestore.googleapis.com", ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92 _settingsFrozen: false
93 app: (...)
94 _initialized: (...)
95 _terminated: (...)
96
97
ANSWER
Answered 2022-Jan-07 at 19:07Using getFirestore
from lite
library will not work with onSnapshot
. You are importing getFirestore
from lite
version:
1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () => {
7 const [username, setUsername] = useState<string | null>(null)
8
9 const [currentUser, setCurrentUser] = useState<User | null>(null)
10
11 useEffect(() => {
12 let unsubscribe: void | Unsubscribe
13
14 onAuthStateChanged(auth, (user) => {
15 if (user) {
16 setCurrentUser(user)
17 // The Problem is inside this try blog
18 try {
19 // the onsnapshot function is causing the problem
20 console.log('firestore: ', fireStore)
21 unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) => {
22 setUsername(doc.data()?.username)
23 })
24 } catch (e) {
25 console.log(e.message)
26 }
27 } else {
28 setCurrentUser(null)
29 setUsername(null)
30 }
31 })
32
33 return unsubscribe
34 }, [currentUser])
35
36 return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44 apiKey: 'some-api',
45 authDomain: 'some-auth-domain',
46 projectId: 'some-project-id',
47 storageBucket: 'some-storage-bucket',
48 messagingSenderId: 'some-id',
49 appId: 'some-app-id',
50 measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56 firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65 type: "firestore-lite"
66 _app: FirebaseAppImpl
67 _automaticDataCollectionEnabled: false
68 _config: {name: "[DEFAULT]", automaticDataCollectionEnabled: false}
69 _container: ComponentContainer {name: "[DEFAULT]", providers: Map(15)}
70 _isDeleted: false
71 _name: "[DEFAULT]"
72 _options:
73 apiKey: 'some-api'
74 authDomain: 'some-auth-domain'
75 projectId: 'some-project-id'
76 storageBucket: 'some-storage-bucket'
77 messagingSenderId: 'some-id'
78 appId: 'some-app-id'
79 measurementId: 'some-measurement-id'
80 [[Prototype]]: Object
81 automaticDataCollectionEnabled: (...)
82 config: (...)
83 container: (...)
84 isDeleted: (...)
85 name: (...)
86 options: (...)
87 [[Prototype]]: Object
88 _credentials: Q {auth: AuthInterop}
89 _databaseId: H {projectId: "next-firebase-fireship", database: "(default)"}
90 _persistenceKey: "(lite)"
91 _settings: ee {host: "firestore.googleapis.com", ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92 _settingsFrozen: false
93 app: (...)
94 _initialized: (...)
95 _terminated: (...)
96
97import { getFirestore } from 'firebase/firestore/lite'
98
Change the import to:
1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () => {
7 const [username, setUsername] = useState<string | null>(null)
8
9 const [currentUser, setCurrentUser] = useState<User | null>(null)
10
11 useEffect(() => {
12 let unsubscribe: void | Unsubscribe
13
14 onAuthStateChanged(auth, (user) => {
15 if (user) {
16 setCurrentUser(user)
17 // The Problem is inside this try blog
18 try {
19 // the onsnapshot function is causing the problem
20 console.log('firestore: ', fireStore)
21 unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) => {
22 setUsername(doc.data()?.username)
23 })
24 } catch (e) {
25 console.log(e.message)
26 }
27 } else {
28 setCurrentUser(null)
29 setUsername(null)
30 }
31 })
32
33 return unsubscribe
34 }, [currentUser])
35
36 return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44 apiKey: 'some-api',
45 authDomain: 'some-auth-domain',
46 projectId: 'some-project-id',
47 storageBucket: 'some-storage-bucket',
48 messagingSenderId: 'some-id',
49 appId: 'some-app-id',
50 measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56 firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65 type: "firestore-lite"
66 _app: FirebaseAppImpl
67 _automaticDataCollectionEnabled: false
68 _config: {name: "[DEFAULT]", automaticDataCollectionEnabled: false}
69 _container: ComponentContainer {name: "[DEFAULT]", providers: Map(15)}
70 _isDeleted: false
71 _name: "[DEFAULT]"
72 _options:
73 apiKey: 'some-api'
74 authDomain: 'some-auth-domain'
75 projectId: 'some-project-id'
76 storageBucket: 'some-storage-bucket'
77 messagingSenderId: 'some-id'
78 appId: 'some-app-id'
79 measurementId: 'some-measurement-id'
80 [[Prototype]]: Object
81 automaticDataCollectionEnabled: (...)
82 config: (...)
83 container: (...)
84 isDeleted: (...)
85 name: (...)
86 options: (...)
87 [[Prototype]]: Object
88 _credentials: Q {auth: AuthInterop}
89 _databaseId: H {projectId: "next-firebase-fireship", database: "(default)"}
90 _persistenceKey: "(lite)"
91 _settings: ee {host: "firestore.googleapis.com", ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92 _settingsFrozen: false
93 app: (...)
94 _initialized: (...)
95 _terminated: (...)
96
97import { getFirestore } from 'firebase/firestore/lite'
98import { getFirestore } from 'firebase/firestore'
99
From the documentation,
The
onSnapshot
method andDocumentChange
,SnapshotListenerOptions
,SnapshotMetadata
,SnapshotOptions
andUnsubscribe
objects are not included inlite
version.
Another reason for this error to show up could be passing invalid first argument to collection()
or doc()
functions. They both take a Firestore instance as first argument.
1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () => {
7 const [username, setUsername] = useState<string | null>(null)
8
9 const [currentUser, setCurrentUser] = useState<User | null>(null)
10
11 useEffect(() => {
12 let unsubscribe: void | Unsubscribe
13
14 onAuthStateChanged(auth, (user) => {
15 if (user) {
16 setCurrentUser(user)
17 // The Problem is inside this try blog
18 try {
19 // the onsnapshot function is causing the problem
20 console.log('firestore: ', fireStore)
21 unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) => {
22 setUsername(doc.data()?.username)
23 })
24 } catch (e) {
25 console.log(e.message)
26 }
27 } else {
28 setCurrentUser(null)
29 setUsername(null)
30 }
31 })
32
33 return unsubscribe
34 }, [currentUser])
35
36 return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44 apiKey: 'some-api',
45 authDomain: 'some-auth-domain',
46 projectId: 'some-project-id',
47 storageBucket: 'some-storage-bucket',
48 messagingSenderId: 'some-id',
49 appId: 'some-app-id',
50 measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56 firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65 type: "firestore-lite"
66 _app: FirebaseAppImpl
67 _automaticDataCollectionEnabled: false
68 _config: {name: "[DEFAULT]", automaticDataCollectionEnabled: false}
69 _container: ComponentContainer {name: "[DEFAULT]", providers: Map(15)}
70 _isDeleted: false
71 _name: "[DEFAULT]"
72 _options:
73 apiKey: 'some-api'
74 authDomain: 'some-auth-domain'
75 projectId: 'some-project-id'
76 storageBucket: 'some-storage-bucket'
77 messagingSenderId: 'some-id'
78 appId: 'some-app-id'
79 measurementId: 'some-measurement-id'
80 [[Prototype]]: Object
81 automaticDataCollectionEnabled: (...)
82 config: (...)
83 container: (...)
84 isDeleted: (...)
85 name: (...)
86 options: (...)
87 [[Prototype]]: Object
88 _credentials: Q {auth: AuthInterop}
89 _databaseId: H {projectId: "next-firebase-fireship", database: "(default)"}
90 _persistenceKey: "(lite)"
91 _settings: ee {host: "firestore.googleapis.com", ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92 _settingsFrozen: false
93 app: (...)
94 _initialized: (...)
95 _terminated: (...)
96
97import { getFirestore } from 'firebase/firestore/lite'
98import { getFirestore } from 'firebase/firestore'
99// Ensure that "db" is defined and initialized
100const db = getFirestore();
101// console.log(db);
102
103const colRef = collection(db, "collection_name");
104
QUESTION
How do I get details of a veracode vulnerability report?
Asked 2022-Jan-07 at 21:46How do I get details of a veracode vulnerability report?
I'm a maintainer of a popular JS library, Ramda, and we've recently received a report that the library is subject to a prototype pollution vulnerability. This has been tracked back to a veracode report that says:
ramda is vulnerable to prototype pollution. An attacker can inject properties into existing construct prototypes via the
_curry2
function and modify attributes such as__proto__
,constructor
, andprototype
.
I understand what they're talking about for Prototype Pollution. A good explanation is at snyk's writeup for lodash.merge
. Ramda's design is different, and the obvious analogous Ramda code is not subject to this sort of vulnerability. That does not mean that no part of Ramda is subject to it. But the report contains no details, no code snippet, and no means to challenge their findings.
The details of their description are clearly wrong. _curry2
could not possibly be subject to this problem. But as that function is used as a wrapper to many other functions, it's possible that there is a real vulnerability hidden by the reporter's misunderstanding.
Is there a way to get details of this error report? A snippet of code that demonstrates the problem? Anything? I have filled out their contact form. An answer may still be coming, as it was only 24 hours ago, but I'm not holding my breath -- it seems to be mostly a sales form. All the searching I've done leads to information about how to use their security tool and pretty much nothing about how their custom reports are created. And I can't find this in CVE databases.
ANSWER
Answered 2022-Jan-07 at 21:46Ok, so to answer my own question, here's how to get the details on a Veracode vulnerability report in less than four weeks and in only fifty-five easy steps.
Pre-work
Have someone post an issue against your library suggesting that its
mapObjIndexed
function is subject to the prototype pollution vulnerability.Respond to say that you don't think the user has demonstrated that well-known vulnerability, but that you will dig deeper.
Write a detailed post described what that vulnerability means and demonstrate that the library is not in fact subject to it, or or at least that the example supplied does not demonstrate it.
Carry on a short conversation with interested parties explaining the point more thoroughly and responding to objections.
Leave the issue open for a while so the original reporter can argue the point and respond. 1
Receive a comment on the issue that says that the user has received
a VULN ticket to fix this
Prototype Pollution vulnerability found in ramda.
Carry on a discussion regarding this comment to learn that there is a report that claims that
ramda is vulnerable to prototype pollution. An attacker can inject properties into existing construct prototypes via the
_curry2
function and modify attributes such as__proto__
,constructor
, andprototype
.and eventually learn that this is due to a report from the software security company Veracode.
Examine that report to find that it has no details, no explanation of how to trigger the vulnerability, and no suggested fix.
Examine the report and other parts of the Veracode site to find there is no public mechanism to challenge such a report.
Report back to the library's issue that the report must be wrong, as the function mentioned could not possibly generate the behavior described.
Post an actual example of the vulnerability under discussion and a parallel snippet from the library to demonstrate that it doesn't share the problem.
Find Veracode's online support form, and submit a request for help. Keep your expectations low, as this is probably for the sales department.
Post a StackOverflow Question2 asking how to find details of a Veracode vulnerability report, using enough details that if the community has the knowledge, it should be easy to answer.
- Try to enjoy your Friday and Saturday. Don't obsessively check your email to see if Veracode has responded. Don't visit the StackOverflow question every hour to see if anyone has posted a solution. Really, don't do these things; they don't help.
- Add a 250-reputation point bounty to the StackOverflow question, trying to get additional attention from the smart people who must have dealt with this before.
- Find direct email support addresses on the Veracode site, and send an email asking for details of the supposed vulnerability, a snippet that demonstrates the issue, and procedures to challenge their findings.
Receive a response from a Veracode Support email addressthat says, in part,
Are you saying our vuln db is not correct per your github source? If so, I can send it to our research team to ensure it looks good and if not, to update it.
As for snips of code, we do not provide that.
Reply, explaining that you find the report missing the details necessary to challenge it, but that yes, you expect it is incorrect.
Receive a response that this has been "shot up the chain" and that you will be hearing from them soon.
- Again, don't obsessively check your email or the StackOverflow question. But if you do happen to glance at StackOverflow, notice that while there are still no answers to it, there are enough upvotes to cover over half the cost of the bounty. Clearly you're not alone in wanting to know how to do this.
Receive an email from Veracode:
Thank you for your interest in Application Security and Veracode.
Do you have time next week to connect?
Also, to make sure you are aligned with the right rep, where is your company headquartered?
Respond that you're not a potential customer and explain again what you're looking for.
Add a comment to the StackOverflow to explain where the process has gotten to and expressing your frustration.
Watch another weekend go by without any way to address this concern.
Get involved in a somewhat interesting discussion about prototype pollution in the comments to the StackOverflow post.
Receive an actually helpful email from Veracode, sent by someone new, whose signature says he's a sales manager. The email will look like this:
Hi Scott, I asked my team to help out with your question, here was their response:
We have based this artifact from the information available in https://github.com/ramda/ramda/pull/3192. In the Pull Request, there is a POC (https://jsfiddle.net/3pomzw5g/2/) clearly demonstrating the prototype pollution vulnerability in the mapObjIndexed function. In the demo, the user object is modified via the
__proto__
property and is
considered a violation to the Integrity of the CIA triad. This has been reflected in our CVSS scoring for this vulnerability in our vuln db.There is also an unmerged fix for the vulnerability which has also been
included in our artifact (https://github.com/ramda/ramda/pull/3192/commits/774f767a10f37d1f844168cb7e6412ea6660112d )Please let me know if there is a dispute against the POC, and we can look further into this.
Try to avoid banging your head against the wall for too long when you realize that the issue you thought might have been raised by someone who'd seen the Veracode report was instead the source of that report.
Respond to this helpful person that yes you will have a dispute for this, and ask if you can be put directly in touch with the relevant Veracode people so there doesn't have to be a middleman.
Receive an email from this helpful person -- who needs a name, let's call him "Kevin" -- receive an email from Kevin adding to the email chain the research team. (I told you he was helpful!)
Respond to Kevin and the team with a brief note that you will spend some time to write up a response and get back to them soon.
Look again at the Veracode Report and note that the description has been changed to
ramda is vulnerable to prototype pollution. An attacker is able to inject and modify attributes of an object through the
mapObjIndexed
function via the proto property.but note also that it still contains no details, no snippets, no dispute process.
Receive a bounced-email notification because that research team's email is for internal Veracode use only.
Laugh because the only other option is to cry.
Tell Kevin what happened and make sure he's willing to remain as an intermediary. Again he's helpful and will agree right away.
Spend several hours writing up a detailed response, explaining what prototype pollution is and how the examples do not display this behavior. Post it ahead of time on the issue. (Remember the issue? This is a story about the issue.3) Ask those reading for suggestions before you send the email... mostly as a way to ensure you're not sending this in anger.
Go ahead and email it right away anyway; if you said something too angry you probably don't want to be talked out of it now, anyhow.
Note that the nonrefundable StackOverflow bounty has expired without a single answer being offered.
Twiddle your thumbs for a week, but meanwhile...
Receive a marketing email from Veracode, who has never sent you one before.
Note that Veracode has again updated the description to say
ramda allows object prototype manipulation. An attacker is able to inject and modify attributes of an object through the
mapObjIndexed
function via the proto property. However, due to ramda's design where object immutability is the default, the impact of this vulnerability is limited to the scope of the object instead of the underlying object prototype. Nonetheless, the possibility of object prototype manipulation as demonstrated in the proof-of-concept under References can potentially cause unexpected behaviors in the application. There are currently no known exploits.If that's not clear, a translation would be, "Hey, we reported this, and we don't want to back down, so we're going to say that even though the behavior we noted didn't actually happen, the behavior that's there is still, umm, err, somehow wrong."
Note that a fan of the library whose employer has a Veracode account has been able to glean more information from their reports. It turns out that their details are restricted to logged-in users, leaving it entirely unclear how they thing such vulnerabilities should be fixed.
Send a follow-up email to Kevin4 saying
I'm wondering if there is any response to this.
I see that the vulnerability report has been updated but not removed.
I still dispute the altered version of it. If this behavior is a true vulnerability, could you point me to the equivalent report on JavaScript'sObject.assign
, which, as demonstrated earlier, has the exact same issue as the function in question.My immediate goal is to see this report retracted. But I also want to point out the pain involved in this process, pain that I think Veracode could fix:
I am not a customer, but your customers are coming to me as Ramda's maintainer to fix a problem you've reported. That report really should have enough information in it to allow me to confirm the vulnerability reported. I've learned that such information is available to a logged- in customer. That doesn't help me or others in my position to find the information. Resorting to email and filtering it through your sales department, is a pretty horrible process. Could you alter your public reports to contain or point to a proof of concept of the vulnerability?
And could you further offer in the report some hint at a dispute process?
Receive an email from the still-helpful Kevin, which says
Thanks for the follow up [ ... ], I will continue to manage the communication with my team, at this time they are looking into the matter and it has been raised up to the highest levels.
Please reach back out to me if you don’t have a response within 72 hrs.
Thank you for your patience as we investigate the issue, this is a new process for me as well.
Laugh out loud at the notion that he thinks you're being patient.
Respond, apologizing to Kevin that he's caught in the middle, and read his good-natured reply.
Hear back from Kevin that your main objective has been met:
Hi Scott, I wanted to provide an update, my engineering team got back
to me with the following:“updating our DB to remove the report is the final outcome”
I have also asked for them to let me know about your question regarding the ability to contend findings and will relay that back once feedback is received.
Otherwise, I hope this satisfies your request and please let me know if any further action is needed from us at this time.
Respond gratefully to Kevin and note that you would still like to hear about how they're changing their processes.
Reply to your own email to apologize to Kevin for all the misspelling that happened when you try to type anything more than a short text on your mobile device.
Check with that helpful Ramda user with Veracode log-in abilities whether the site seems to be updated properly.
Reach out to that same user on Twitter when he hasn't responded in five minutes. It's not that you're anxious and want to put this behind you. Really it's not. You're not that kind of person.
Read that user's detailed response explaining that all is well.
Receive a follow-up from the Veracode Support email address telling you that
After much consideration we have decided to update our db to remove this report.
and that they're closing the issue.
Laugh about the fact that they are sending this after what seem likely the close of business for the week (7:00 PM your time on a Friday.)
Respond politely to say that you're grateful for the result, but that you would still like to see their dispute process modernized.
- Write a 2257-word answer5 to your own Stack Overflow question explaining in great detail the process you went through to resolve this issue.
And that's all it takes. So the next time you run into this, you can solve it too!
Update
(because you knew it couldn't be that easy!)
Day 61Receive an email from a new Veracode account executive which says
Thanks for your interest! Introducing myself as your point of contact at Veracode.
I'd welcome the chance to answer any questions you may have around Veracode's services and approach to the space.
Do you have a few minutes free to touch base? Please let me know a convenient time for you and I'll follow up accordingly.
Politely respond to that email suggesting a talk with Kevin and including a link to this list of steps.
1 This is standard behavior with Ramda issues, but it might be the main reason Veracode chose to report this.
2 Be careful not to get into an infinite loop. This recursion does not have a base case.
3 Hey, this was taking place around Thanksgiving. There had to be an Alice's Restaurant reference!
4 If you haven't yet found a Kevin, now would be a good time to insist that Veracode supply you with one.
5 Including footnotes.
Community Discussions contain sources that include Stack Exchange Network