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

peg$SyntaxError: Expected [\r\n\0] or [^\r\n\0] but end of input found. #101

Open
Tahernejad opened this issue Oct 15, 2020 · 2 comments
Open

Comments

@Tahernejad
Copy link

Hello,
I have a mikrotik version 6.29.1, I don't have problem in: /ip/neighbor/print
but in 6.42.7 or 6.42.3 , will give this error:

Packet received: [
'\x03!re\x10.tag=neighbors-1\b=.id=*23!=interface=ether3_ToTahernejad-PC\x1E=mac-address=00:15:E9:BB:C8:92\n' +
'=identity=\n' +
'=platform=\t=version=\f=unpack=none\x0B=age=11m49s\r=system-caps=\x15=system-caps-enabled=',
'\x05!done\x10.tag=neighbors-1',
''
]



Error processing sentence: peg$SyntaxError: Expected [\r\n\0] or [^\r\n\0] but end of input found.
at peg$buildStructuredError (C:\Users\Sajad\Documents\skynodes\node_modules\mikronode\dist\mikronode.js:2174:13)
at Object.peg$parse [as parse] (C:\Users\Sajad\Documents\skynodes\node_modules\mikronode\dist\mikronode.js:3201:12)
at MapSubscriber.project (C:\Users\Sajad\Documents\skynodes\node_modules\mikronode\dist\mikronode.js:486:39)
at MapSubscriber._next (C:\Users\Sajad\Documents\skynodes\node_modules\rxjs\src\operator\map.ts:75:29)
at MapSubscriber.Subscriber.next (C:\Users\Sajad\Documents\skynodes\node_modules\rxjs\src\Subscriber.ts:95:12)
at MapSubscriber._next (C:\Users\Sajad\Documents\skynodes\node_modules\rxjs\src\operator\map.ts:80:22)
at MapSubscriber.Subscriber.next (C:\Users\Sajad\Documents\skynodes\node_modules\rxjs\src\Subscriber.ts:95:12)
at DoSubscriber._next (C:\Users\Sajad\Documents\skynodes\node_modules\rxjs\src\operator\do.ts:98:24)
at DoSubscriber.Subscriber.next (C:\Users\Sajad\Documents\skynodes\node_modules\rxjs\src\Subscriber.ts:95:12)
at Subject.next (C:\Users\Sajad\Documents\skynodes\node_modules\rxjs\src\Subject.ts:61:17) {
expected: [
{
type: 'class',
parts: [Array],
inverted: true,
ignoreCase: false
},
{
type: 'class',
parts: [Array],
inverted: false,
ignoreCase: false
}
],
found: null,
location: {
start: { offset: 187, line: 12, column: 22 },
end: { offset: 187, line: 12, column: 22 }
}
}
Skipping and continuing


@vishalsevani
Copy link

vishalsevani commented Oct 23, 2020

Iam also facing the same problem in /ip/neighbor/print on 6.46.7. I think it is because the property '=system-caps=' and '=system-caps-enabled=' has no value.
If I use the api command /ip/neighbor/print\n=.proplist=system-caps,identity it works. But If I use the api command, /ip/neighbor/print\n=.proplist=identity,system-caps i.e. print system-caps at the end, it fails with above error.
Any solution?

@Tahernejad
Copy link
Author

Tahernejad commented Oct 26, 2020

Thanks for explain,
I'm beginner in javascript,
but changed line of 482mikronode.js as below and resolved:

var abc = (x.split("\r").join("\\r").split("\n").join("\\n")) if (abc.endsWith("=")) { abc += " " } return abc

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

No branches or pull requests

2 participants