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

False positive check. Annoying warning. @firebase/firestore: Firestore: Host has been set in both settings() and useEmulator(), emulator host will be used #7331

Closed
iSuslov opened this issue May 27, 2023 · 1 comment · Fixed by #7339
Assignees
Labels

Comments

@iSuslov
Copy link

iSuslov commented May 27, 2023

Look at the arguments here:

export function connectFirestoreEmulator(
firestore: Firestore,
host: string,
port: number,
options: {
mockUserToken?: EmulatorMockTokenOptions | string;
} = {}
): void {

Now look at how you set host in settings:

firestore._setSettings({
...settings,
host: `${host}:${port}`,
ssl: false
});

Now look at how you comparing host:port (from settings) with host :

if (settings.host !== DEFAULT_HOST && settings.host !== host) {
logWarn(
'Host has been set in both settings() and useEmulator(), emulator host ' +
'will be used'
);
}

@iSuslov iSuslov changed the title False positive check. Annoying warning False positive check. Annoying warning. @firebase/firestore: Firestore: Host has been set in both settings() and useEmulator(), emulator host will be used May 27, 2023
@jbalidiong jbalidiong added api: firestore testing-sdk testing with emulator labels May 29, 2023
@ehsannas ehsannas self-assigned this May 30, 2023
@ehsannas
Copy link
Contributor

Thanks for reporting @iSuslov . I'll take a look.

ehsannas added a commit that referenced this issue May 30, 2023
ehsannas added a commit that referenced this issue Jun 6, 2023
* Fix potentially false warning message.

Fixes #7331.

* Create giant-bees-clean.md
dwyfrequency pushed a commit that referenced this issue Jun 16, 2023
* Fix potentially false warning message.

Fixes #7331.

* Create giant-bees-clean.md
@firebase firebase locked and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants