# Implement the Serialization of a Passport User MONGO PARSE ERROR

**URL:** <https://forum.freecodecamp.org/t/implement-the-serialization-of-a-passport-user-mongo-parse-error/451136>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [March 14, 2021, 10:01pm UTC](https://forum.freecodecamp.org/t/implement-the-serialization-of-a-passport-user-mongo-parse-error/451136 "2021-03-14T22:01:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![unomanrique](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/unomanrique/32/185572_2.png) [@unomanrique](https://forum.freecodecamp.org/u/unomanrique)\
**Post date:** [March 14, 2021, 10:01pm UTC](https://forum.freecodecamp.org/t/implement-the-serialization-of-a-passport-user-mongo-parse-error/451136/1 "2021-03-14T22:01:24Z")

</div>

**Tell us what’s happening:**  
Hi,when i try to run the app in replit i get this error:

 npm start

> fcc-advanced-node-and-express@0.0.1 start /home/runner/boilerplate-advancednode  
> node server.js

express-session deprecated req.secret; provide secret option server.js:22:9  
Listening on port 3000  
MongoParseError: URI malformed, cannot be parsed  
at parseConnectionString (/home/runner/boilerplate-advancednode/node\_modules/mongodb/lib/core/uri\_parser.js:560:21)  
at connect (/home/runner/boilerplate-advancednode/node\_modules/mongodb/lib/operations/connect.js:282:3)  
at /home/runner/boilerplate-advancednode/node\_modules/mongodb/lib/mongo\_client.js:223:5  
at maybePromise (/home/runner/boilerplate-advancednode/node\_modules/mongodb/lib/utils.js:662:3)  
at MongoClient.connect (/home/runner/boilerplate-advancednode/node\_modules/mongodb/lib/mongo\_client.js:219:10)  
at main (/home/runner/boilerplate-advancednode/connection.js:11:22)  
at Object. (/home/runner/boilerplate-advancednode/server.js:32:1)  
at Module.\_compile (internal/modules/cjs/loader.js:1138:30)  
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:1158:10)  
at Module.load (internal/modules/cjs/loader.js:986:32)

this is my proect:  
**Your code so far**

```auto
https://boilerplate-advancednode.carlosmanrique1.repl.co

```

i cant find the error,i think i posted wrong the value of the MONGO URI, but i dont know how to fix it,any help?

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36`.

**Challenge:** Implement the Serialization of a Passport User

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![caryaharper](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/caryaharper/32/209142_2.png) [@caryaharper](https://forum.freecodecamp.org/u/caryaharper)\
**Post date:** [March 31, 2021, 2:17am UTC](https://forum.freecodecamp.org/t/implement-the-serialization-of-a-passport-user-mongo-parse-error/451136/2 "2021-03-31T02:17:02Z")

</div>

A couple of things need to be changed, and one of them is simple, and I can see why you missed it. You are going to want to replace your `sample.env` file with just `.env` instead, and your `MONGO_URI` is also incorrect as you are using the generic example they provided which will not help, but I’ll let you try to get the right URL on your own, but if you would like more help I’ll be glad to do so.

---

<div class="post-metadata">

**Author:** ![Sky020](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sky020/32/128093_2.png) [@Sky020](https://forum.freecodecamp.org/u/Sky020)\
**Post date:** [March 31, 2021, 8:56am UTC](https://forum.freecodecamp.org/t/implement-the-serialization-of-a-passport-user-mongo-parse-error/451136/3 "2021-03-31T08:56:25Z")

</div>

Hello there,

As _caryaharper_ mentioned, the issue is your MongoDB URI. There is a link in this lesson to a news article tutorial walking you through how to get a MongoDB Atlas URI, if you have not already done this section.:

- [https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/install-and-set-up-mongoose](https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/install-and-set-up-mongoose)

Hope this helps

---

<div class="post-metadata">

**Author:** ![unomanrique](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/unomanrique/32/185572_2.png) [@unomanrique](https://forum.freecodecamp.org/u/unomanrique)\
**Post date:** [April 1, 2021, 12:32am UTC](https://forum.freecodecamp.org/t/implement-the-serialization-of-a-passport-user-mongo-parse-error/451136/4 "2021-04-01T00:32:04Z")

</div>

thank you,i’ll look into it

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [September 30, 2021, 12:32pm UTC](https://forum.freecodecamp.org/t/implement-the-serialization-of-a-passport-user-mongo-parse-error/451136/5 "2021-09-30T12:32:53Z")

</div>

Closed on September 30, 2021, 12:32pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
