I am trying to reference a location in my Firebase database, but .child() fails with the following error:
Uncaught Error: Firebase.child failed: First argument was an invalid path: "https://wooperate.firebaseio.com/comments-to/-KTLOwq-WK4VwMhG7Zz8/-KTPmJJtmZQa7ldWILks". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"
Not only is it a valid path, but it also contains data!
Am I thick or is this just a bug in Firebase?
Edit: This is the code that triggers the error:
FIREBASE_REF.child('comments-to').child(post.id).child(comment.id);
Explanation of variables:
FIREBASE_REF: root referance to my firebase database
post.id: Firebase generated id
comment.id: Firebase generated id Full Firebase reference to the comment ― This was the error :(
The following does not trigger any errors:
FIREBASE_REF.child('comments-to').child(post.id);
As stated above, the path to the comment exists and contains data.
Maybe your comment.id is empty or contains ".", "#", "$", "[", or "]" as said in logcat. Sometimes using - and nodes starting with Capital Letter also cause this problem. It could be with comments-to try using commentsTo instead.
Yes, I'm thick.
I misunderstood the error message. Of course the illegal argument was the argument provided to child(): i.e. comment.id, and not the (url to) the reference resulting from the call .child(comment.id).
The source of the error was that I used snap.ref rather than snap.val when I set the comment.id.
Related
When I search with ack-grep I get this error,
$ ack-grep SearchString
Invalid filter specification "tags" at /usr/bin/ack-grep line 126.
main::_compile_file_filter('HASH(0x18cad00)', 'ARRAY(0x19d8700)') called at /usr/bin/ack-grep line 917
main::main() called at /usr/bin/ack-grep line 75
Found answer for my own question.
I was trying to make ack-grep ignore "tags" file generated by ctags and added incorrect syntax to $HOME/.ackrc
Once I fixed it, the issue got resolved.
Incorrect syntax,
--ignore-file=tags
Correct syntax,
--ignore-file=is:tags
Im getting this error in my firebase realtime database when trying to publish the new rules.The error is as it says in the title "missing ) after argument list" not really sure what the issue is but here is the line that gave me the error
,".validate": "newData.val().contains('data.parent().child('Name').val()')"
The single quotes in the value are likely to be the problem:
"newData.val().contains('data.parent().child('Name').val()')"
^ these quotes ^
I am running the following test inside Robot Framework:
*** Settings ***
Documentation This initializes testrun.robot
Library Process
Library OperatingSystem
Library XML
Library Collections
Output Is A Valid XML File Against JATS format
Start Process xmllint --dtdvalid http://jats.nlm.nih.gov/archiving/1.1d3/JATS-archivearticle1.dtd ./output/nlm/out.xml shell=True
${result}= Wait For Process timeout=45 secs
Log ${result.stdout}
Log ${result.stderr}
Run Keyword Unless '${result.stderr} == ${EMPTY}' Should Contain ${result.stderr} element xref: validity error : IDREFS attribute rid references an unknown
The variable ${result.stderr} is a string that contains the substring 'element xref: validity error : IDREFS attribute rid references an unknown'. As far as I know, I'm not dealing with any whitespace errors or quotation problems, although I could be wrong. (I've been fiddling around with that for a while now.)
Thanks for the help!
Edit: The log that Robot Framework generates tells me that the process has finished (that's how I know what result.stderr contains.)
Consider this statement:
Run Keyword Unless '${result.stderr} == ${EMPTY}' ...
The keyword will never run because you aren't comparing two variables, you are simply checking whether the string literal string '${result.stderr} == ${EMPTY}' is not empty (and it's not, because it has 28 characters).
It is the same as if you did this in python:
if len('${result.stderr} == ${EMPTY}') > 0:
...
You need to put the single quotes around each variable separately so that you are passing a valid expression to the if statement, rather than a string that looks like a valid expression:
Run Keyword Unless '${result.stderr}' == '${EMPTY}' ...
The manual says I can use:
--warnings_whitelist_file VAL : A file containing warnings to
suppress. Each line should be of the
form
<file-name>:<line-number>? <warning-d
escription>
This is what my whitelist looks like:
ef-utils.js:1 Redeclared variable: ef
ef-utils.js:1 Variable ef first declared in externs-ko.js
ef-validation.js:1 Redeclared variable: ef
ef-validation.js:1 Variable ef first declared in externs-ko.js
And I am still getting warnings while compiling:
ef-utils.js:1: WARNING - Redeclared variable: ef
?var ef = (function (ns, ko) {
^
ef-utils.js:1: WARNING - Variable ef first declared in externs-ko.js
?var ef = (function (ns, ko) {
^
ef-validation.js:1: WARNING - Redeclared variable: ef
?var ef = (function (ns, ko) {
^
ef-validation.js:1: WARNING - Variable ef first declared in externs-ko.js
?var ef = (function (ns, ko) {
^
I just toyed around with the current WhitelistWarningsGuard. I found out that
Line numbers are completely ignored: they are stripped both from the input file and the encountered warnings.
File names are formatted as they are for output, i.e. as they occur on the command line.
There is a colon after the file name, followed by two spaces, followed by the message text without indicator of the severity (WARNING, ERROR).
The main effect of the whitelist appears to be turning errors into warnings. So when applied to warnings, there will be no effect at all.
The WhitelistBuilder mentioned by Tibos is there in the code, but I see no way to use it from the command line.
As it is, that feature appears to be mostly useless for my use cases…
You should use the WhitelistBuilder to build the whitelist file. From the looks of it, you need absolute paths to the files, not relative.
As MvG correctly stated as this flag is implemented it's useless. Though, with pretty light changes to the compiler's code it can be turned to what we all expect from it: suppressing errors and warnings we don't want to see.
See details here: Suppressing or resolving compiler errors in goog.base
I am trying to copy a file using Installscript copy file function:
bRet=CopyFile( szUnattendIni, szStatusFile );
where the file referred by szUnattendIni is passed as command line argument.
When I pass this file from commandline using double quotes, bRet returns an error saying "System cannot find the file specified"...but when I pass the same name without double quotes, it works fine.
I tried adding a check before copying to verify whether source file exists using:
if(Is( FILE_EXISTS,szUnattendIni)) then
MessageBox("File Exists",INFORMATION);
endif;
In both the cases, the message box is displayed saying the file exists.
I want to support paths with directory name containing spaces for which double quotes is required. But I am not able to. How can I fix this problem.
I found the answer, it is an issue with the Installscript CopyFile function.
Refer to the link below:
http://kb.flexerasoftware.com/selfservice/viewContent.do?externalID=Q105860