LINE icon indicating copy to clipboard operation
LINE copied to clipboard

Line update, what do we do now?

Open monhustla opened this issue 7 years ago • 36 comments

Has anyone formulated a work around yet?

monhustla avatar Jul 30 '17 18:07 monhustla

Me and some other does, cant expain here, its too dangerous

ii64 avatar Jul 31 '17 10:07 ii64

@anysz what's a good way to contact you?

scomma avatar Jul 31 '17 10:07 scomma

Assuming you've got it working before.

api.py

  1. Above init, set: LINE_HTTP_IN_URL = LINE_DOMAIN + "/P4" LINE_HTTP_OUT_URL = LINE_DOMAIN + "/S4"

  2. comment out anything with _in (client_in, transport_in, etc)

  3. in ready(self), change self.transport = THttpClient(self.LINE_HTTP_URL) to self.transport = THttpClient(self.LINE_HTTP_IN_URL)

  4. make a copy of self.transport = ...,, self.protocol = ..., self.client = ..., self.client.open() in ready(self), and add _out to em (transport_out, etc), then change: self.transport_out = THttpClient(self.LINE_HTTP_IN_URL) to self.transport_out = THttpClient(self.LINE_HTTP_OUT_URL)

  5. Make POST requests (or just anything that should send notification) use client_out instead (ex. sendMessage)

  6. change tokenLogin(self) to just def tokenLogin(self): -----ready()

  7. in login(self) change self.transport = THttpClient(self.LINE_HTTP_URL) to if self.authToken is None: ----self.transport = THttpClient(self.LINE_HTTP_URL) else: ----self.transport = THttpClient(self.LINE_HTTP_IN_URL)

Pardon the '-'s, I meant spaces.

Ref #127 , #65

R-N avatar Aug 01 '17 02:08 R-N

@R-N Can you link me the actual code. This is confusing.

BloodySenpai avatar Aug 01 '17 08:08 BloodySenpai

@R-N is explaining about how to login with authToken.

ii64 avatar Aug 01 '17 08:08 ii64

@anysz I know this was never a problem before I'm wondering why he edited it

BloodySenpai avatar Aug 01 '17 08:08 BloodySenpai

Stop being gay @anysz

BloodySenpai avatar Aug 01 '17 08:08 BloodySenpai

@anysz hey, I know you

ZoorKriid avatar Aug 01 '17 08:08 ZoorKriid

Which part confuse you? Who edited what?

R-N avatar Aug 01 '17 09:08 R-N

My bot can't login since yesterday, but before can. Has anyone can help?

surya-zxc avatar Aug 01 '17 23:08 surya-zxc

I know why @anysz can't show. Line is cracking down fast on any kind of fixes. We need to be careful what we put out there after finding a new fix.

monhustla avatar Aug 01 '17 23:08 monhustla

Obviously we need to collaborate despite that, so maybe a closed discussion group?

scomma avatar Aug 02 '17 04:08 scomma

@R-N May I ask you the code hint for your step# 4 ? >>Make POST requests (or just anything that should send notification) use client_out instead (ex. sendMessage)

Mari2928 avatar Aug 02 '17 06:08 Mari2928

Also, I get the error when the script runs your step 6.

if self.authToken is None: ----self.transport = THttpClient.THttpClient(self.LINE_HTTP_URL) else: ----self.transport = THttpClient.THttpClient(self.LINE_HTTP_IN_URL)

Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\line\client.py", line 88, in init self.login() File "C:\Python27\lib\site-packages\line\api.py", line 130, in login if self.authToken is None: File "C:\Python27\lib\site-packages\curve\CurveThrift.py", line 344, in loginWithIdentityCredentialForCertificate return self.recv_loginWithIdentityCredentialForCertificate() File "C:\Python27\lib\site-packages\curve\CurveThrift.py", line 375, in recv_loginWithIdentityCredentialForCertificate raise result.e curve.ttypes.TalkException: TalkException(parameterMap=None, reason='Internal error', code=20)

Mari2928 avatar Aug 02 '17 06:08 Mari2928

I found the tokens created before July 30 are still working fine with previous api.py.

Mari2928 avatar Aug 02 '17 07:08 Mari2928

Line made their move.

BloodySenpai avatar Aug 02 '17 08:08 BloodySenpai

Anyone want to contact me just chat me. <:)>

ii64 avatar Aug 02 '17 08:08 ii64

This afternoon my authToken expired. Not sure if Line 'did' it or it was just normal expiration. But then I get Internal Error code=20 when logging in with email. Maybe Line made their move just like @BloodySenpai said.

@Mari2928 In api.py, some method will send notification to user. For example, sendMessage, acceptGroupInvitation, inviteIntoGroup/Room, kickFromGroup, etc. Those should use S4 (_client_out) if you want them to send notification. I don't know if P4 worked for those too. TalkService worked but never send notification. Though now none works for me, lol.

R-N avatar Aug 02 '17 10:08 R-N

@R-N I see. Thank you for the information. My token (issued one month ago) is still valid and works sending messages, but the tokens for my friends which were issued 2 days ago became invalid today. I hope there is any solution for going forward...

Mari2928 avatar Aug 02 '17 12:08 Mari2928

You're welcome. By the way maybe we can just use both P4 and S4 in one CurveClient by providing P4 protocol for iprot and S4 protocol for oprot. Can't test tho.

R-N avatar Aug 02 '17 12:08 R-N

@R-N I did what you said but i get this error Traceback (most recent call last): File "", line 1, in File "line/client.py", line 88, in init self.login() File "line/api.py", line 123, in login if self.authToken is None: AttributeError: 'LineClient' object has no attribute 'authToken'

anythingg avatar Aug 02 '17 22:08 anythingg

oh. never mind. I just noticed that you said after your authtoken expired you couldnt log in because of the new line update. I thought that was a work around you posted.

anythingg avatar Aug 02 '17 22:08 anythingg

@R-N can you upload your script on your github??

alroysh avatar Aug 03 '17 02:08 alroysh

It doesnt even work right now

R-N avatar Aug 03 '17 04:08 R-N

@alroysh: This line api is still working with the current version as of today. I can send messages as usual now. The problem is that we can't get a new token now. Some people tokens became invalid because maybe their desktop logins were automatically logged out while their line apps were being updated.I think we don't need to figure out how to login with token, but just need to find a way to get a new token.

Mari2928 avatar Aug 03 '17 13:08 Mari2928

I got it working but I can't tell how here. I'm quite certain it can be easily patched. My hint is to look at purple-line on altrepo, and try to make things similar starting from the easiest thing you can think of.

By the way, using HTTP_IN for iprot and HTTP_OUT for oprot on the same client doesnt work lole. Getting EOF ERROR.

Also, it's actually possible to pool the CurveClients lol. I think that speed things up for me.

R-N avatar Aug 03 '17 14:08 R-N

@R-N Oh have you succeeded to get a new token after the line update?

Mari2928 avatar Aug 03 '17 15:08 Mari2928

I have a problem too. I try to edit api.py follow above comment,but I still login failed. Could you please help to summary solution for solve issue about 'Internal error' and "'LineClient' object has no attribute 'authToken'" Thank you for advised.

Ploiiz avatar Aug 04 '17 05:08 Ploiiz

I can login now, could get a authToken

mamesiba avatar Aug 04 '17 11:08 mamesiba

Still same Internal Error on mine. Have you logged in with LINE ID and password and then get a token?

Mari2928 avatar Aug 04 '17 12:08 Mari2928