Firebase-js-sdk: [database] FIREBASE WARNING: Invalid query string segment:

Created on 16 Feb 2018  路  48Comments  路  Source: firebase/firebase-js-sdk

https://github.com/firebase/firebase-js-sdk/blob/5038cec639e69562f7b3eb1f0e281cf309c79c28/packages/database/src/core/util/libs/parser.ts#L54

@tonymeng This warning now appears during firebase.initializeApp(config) even where config.databaseURL does not include any ns query parameter.

needs-triage

Most helpful comment

this issue has been auto-closed as the fix has been merged, it will be available in the next version of the sdk.

as for what the issue is, there's a bug in parsing the databaseURL which causes the warning to be logged every time a new connection is made. It should not impact any part of the SDK or connectivity as the query string isn't currently being used for anything.

All 48 comments

Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.

Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.

I'll take a look

I have been seeing this too - the query has been running extremely slowly too. Could this be the cause of the slowdown?

The query is

admin.database().ref(`careers/listing-content/${organisation}`).once("value")

and the data in this query only contains 800bytes of data but is taking over 2 seconds to return?

the query has been running extremely slowly too

seeing this too unfortunately

screen shot 2018-02-17 at 10 57 22

I just get this too, but the info about the Warning is incomplete. The function run well, but there is some delay compeers to the nominal speed of Firebase.

I've been getting this for a bit too on my server. What seems to be causing this? It also seems to cause some slowdowns as well.

+1

+1

+1 馃槮

I'm a Software Developer at Google and submitted another issue to investigate this problem a few hours ago. Sorry about the frustration, I wish I was familiar with this domain, and it probably won't help to submit more reports fyi. While a fix may have been made, it might not be present in npm or could have not actually fixed the problem. I will also consider contacting @tonymeng (made a change earlier) tomorrow if we don't hear a response, since this seems significant.

+1

After talking with support this doesn't seem as serious as I thought. The message is just a warning and "shouldn't have any impacts on the function's overall processing." I thought it was preventing changes to functions, but after viewing the function source in the Cloud Console I see the deployments still succeed. I'll keep you updated if I learn anything else. The fix has not been released, but it has been made.

All my functions seem to work fine, and it was not preventing that. This is not a critical bug, but it creates a lot of high level warnings that drown out the other logs.

+1

My functions are working again and I was just unlucky with experiencing another problem causing my functions to fail at the exact same time as this warning.

For anyone wanting to remove the warning, in case it has other associated problems, you can force a dependency of "@firebase/database": 0.1.9. I tested this earlier. Also, if they choose to add the bug fix to the next release, I assume 0.1.11+ will not have the warning.

+1

+1

Hi, thanks for the support. Is the solution would be to configure the functions/package.json file like that:

{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "dependencies": {
    "firebase-admin": "~5.8.1",
    "firebase-functions": "^0.8.1",
    "@firebase/database": 0.1.9
  },
  "private": true
}

Why is this closed ? @tonymeng

+1 I still have a lot of warning today.

+1

+1

+1

this issue has been auto-closed as the fix has been merged, it will be available in the next version of the sdk.

as for what the issue is, there's a bug in parsing the databaseURL which causes the warning to be logged every time a new connection is made. It should not impact any part of the SDK or connectivity as the query string isn't currently being used for anything.

+1

+1

I have the same problem.

Do you know when will fix this issue ?

Thanks

you can ignore it until next update...

        if (parseInt(firebase.SDK_VERSION.replace('.', ''), 10) === 410) {
            console.ignoredYellowBox = ['FIREBASE WARNING: Invalid query string segment:'];
        } else {
            console.error('REMOVE ME!');
        }

+1

+1

Hey y'all!

Appreciate all the interest in having this resolved. As the fix has already been merged it'll be released in the next version of the SDK. If you are anxious for a workaround:

  1. Consider downgrading to @firebase/[email protected], this version does not contain the bug (and the associated query param support)
  2. Look at the firebase@next package (contains the next staged release, this can fall behind a mainline branch as it is only used to stage the next release get on @latest ASAP after the version has been released)
  3. Look at the firebase@canary package (which will always contain the latest valid code).

NOTE: The NPM canary tag is experimental, if you do opt for the second workaround, make sure you get back onto a mainline release ASAP

how about 0.1.11-0 ?

@kleeb That will also work, that is the next staged version and wasn't released when I wrote the above comment. I'll revise it 馃槃

Do you know when will be release the new version ?

Same error here any idea?

+1

+1

+1

+1

what is the command to downgarde the firebase
is it npm install --save firebase@firebase/[email protected]
please help

0.1.11 has just been released

The warning still occurs on 0.1.11 version

@kleeb can you please try clean installing your dependencies. I just tested this myself and it seems to be working. The behavior I found was the following:

  • Complete database URLs, with no query params (i.e. https://<PROJECT>.firebaseio.com), do not trigger the warning
  • Complete database URLs, with a query param set to a value (i.e. https://<PROJECT>.firebaseio.com?foo=bar) do not trigger the warning
  • Complete database URLs, with a query param that is not set (https://<PROJECT>.firebaseio.com?foo) do trigger the warning _(NOTE: This is intended)_

finally fixed it with 0.1.11 version! it removed warning for me

Warning has gone away completely on latest version.

"dependencies": {
    "firebase-admin": "^5.9.0",
    "firebase-functions": "^0.8.1",
  },

@jshcrowthe
I am always cleaning out.

I guess that firebase function cache didn't catch it minutes after the release. I redeployed right now and yes - now it is fixed. Thanks!

first run "npm uninstall @firebase/database"
then "npm uninstall @firebase/[email protected]" does the trick to me :)

Was this page helpful?
0 / 5 - 0 ratings