Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Replaced single quotes in mongodb dump command in windows env #172

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

malconvsilva
Copy link
Contributor

Hello,
I'm facing a problem trying to dump mongodb in my environment.

Env:
laravel/framework: 8.83
mongodb: 5.0.1
so: win11

´
The dump process failed with a none successful exitcode. Exitcode ======== 1: General error Output ====== Error Output ============ 2022-06-14T11:54:00.381-0300 Failed: can't create session: could not connect to server: connection() error occured during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
´

After some tests I found that the problem was in the use of single quotes in the command, in file \Spatie\DbDumper\Databases\MongoDb.php.I replace the single quotes from the username and password the code ran successfully. (lines 69 and 73 of \Spatie\DbDumper\Databases\MongoDb.php );

Dumping is successfully done with double quotes in windows env.

…nction in username and password parameters
@freekmurze freekmurze merged commit e90bdff into spatie:main Jun 15, 2022
@freekmurze
Copy link
Member

Thanks!

@malconvsilva
Copy link
Contributor Author

Thank you guys, this package is amazing!

@Neustradamus
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants