LINE v2 delivery error with AES key: invalid AES decryption string

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

12-06-2019

Hi,

Has someone ever succeeded to install the LINE v2 standard package, in order to send LINE messages (marketing doc: LINE : Free Calls & Messages  and dev doc: LINE Developers )?

We installed the LINE v2 package on our staging instance, configured a LINE service, a LINE v2 external account, both LINE workflows are running with schedulers (deleteBlockedLineUsersV2 & updateLineV2AccessToken --> it gives us an "update token" so the login/authentication/connectivity works well) and a Line V2 delivery.

The option NmsLine_AESKey is configured and uses a value generated by a JS in workflow: "var x = execCommand('openssl rand -base64 32'); logInfo(x);"

The delivery is executing well, as expected, but the generated broadLogs fail with error "Error in delivery part XXX: invalid AES decryption string"

20190612-155615-screenshot-12.jpg

Any idea? Thanks

PS:

External account:

20190612-160711-screenshot-13.jpg

Line account:

20190612-161003-screenshot-14.jpg

20190612-161056-screenshot-15.jpg

Replies

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

12-06-2019

Still investigating, the delivery makes a call to:

> lineConnector-v2.js and function :

>> processDeliveryPart (deliveryPart) calls:

>>> LineAppV2.decryptLineUserId(NL.XTK.toString(msg.@address), aesKey) calls

>>>> decryptString(str, key, false); @throws (new StringGroup("nms:line")).decryptError()

Avatar

Avatar
Boost 250
Employee
ramon_bisswanger
Employee

Likes

271 likes

Total Posts

397 posts

Correct reply

199 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
View profile

Avatar
Boost 250
Employee
ramon_bisswanger
Employee

Likes

271 likes

Total Posts

397 posts

Correct reply

199 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
View profile
ramon_bisswanger
Employee

19-06-2019

Hi,

which ACC version are you using?

Can you check following:

  • Verbose logs when a new follower is added
  • ID stored after following, can you decrypt that with a decrypt string call in JS?

Normally the encrypted user ID should start with a @ sign in current version, so the ID shown in your screenshot looks weird.

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

20-06-2019

Hi Ramon,

Thanks for your reply

We're using ACC v6 build 8857. Which version are you using? Did you encounter the same error?

  • What logs? At the moment, when a new follower subscribes to our Line profile, it doesn't get added to our Recipients database. I set up a simple jssp (https://my.custom.domain.com/my_nms/test-line-webhook-event.jssp) and I used it in the Line setting "Webhook URL", but I'm not sure this step is needed. And when I hit Verify, it says "Success"
  • The id used in my screenshot has been input manually. It's in the Line account setting:

20190620-102220-screenshot-1.jpg

Thank you

Florian

Avatar

Avatar
Boost 250
Employee
ramon_bisswanger
Employee

Likes

271 likes

Total Posts

397 posts

Correct reply

199 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
View profile

Avatar
Boost 250
Employee
ramon_bisswanger
Employee

Likes

271 likes

Total Posts

397 posts

Correct reply

199 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
View profile
ramon_bisswanger
Employee

20-06-2019

Hi Florian,

ok, Campaign expects that the address in the deliveryLog contains the encrypted Line ID and then tries to decrypt it.

That's the place where it fails for you.

You should crypt the ID Ud7* with the NmsLine_AESKey before sending a message.

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

21-06-2019

Hey Ramon,

Thanks a lot, we could encrypt/decrypt the user id using LineAppV2.cryptLineUserId(lineId, aesKey) and decryotLineUserId in JS successfully.

However, it appears that the connector is not using the right lineUserId, it somehow displays #NAME#

broadlog with #NAME#:

20190621-095612-screenshot-1.jpg

Modified connector in order to debug:

20190621-095722-screenshot-2.jpg

So for an unknown reason, ACC tries to decrypt the string "*" instead of the encrypted line id "@Np620N9hcd..."

Any clue?

Thank you very much

Florian

Avatar

Avatar
Validate 250
Level 10
pablo_rosero1
Level 10

Likes

81 likes

Total Posts

348 posts

Correct reply

77 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Validate 250
Level 10
pablo_rosero1
Level 10

Likes

81 likes

Total Posts

348 posts

Correct reply

77 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile
pablo_rosero1
Level 10

02-07-2019

Hi Ramon,

Any new useful ideas for Florian?

Best,

Pablo

Avatar

Avatar
Validate 1
Level 2
connorl17954126
Level 2

Likes

9 likes

Total Posts

20 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
connorl17954126
Level 2

Likes

9 likes

Total Posts

20 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
connorl17954126
Level 2

24-09-2019

Hello Florian,

I just hit the same issue, was this ever resolved?

Thanks,

Connor

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

25-09-2019

Hey Connor,

I'll dig more in this subjet early 2020, no news at the moment

Let me know if you find anything useful!

Thanks

Best regards

Florian

Edit: glad to know you have the same issue, at least it's not an individual problem