Fix: Replaced single quotes in mongodb dump command in windows env #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.