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

'Add account' doesn't work #92

Open
turb1te opened this issue Aug 30, 2021 · 17 comments
Open

'Add account' doesn't work #92

turb1te opened this issue Aug 30, 2021 · 17 comments
Labels
bug Something's broken or doesn't seem right

Comments

@turb1te
Copy link

turb1te commented Aug 30, 2021

I'm new to this software. When I clicked "Add Account/Next" nothing happened. I tried to restart the software but no change. On the first try, it passes (from email) to the password but NEXT button doesn't work the second time (when I typed my password). Then I clicked "save" and tried again, it doesn't accept the email the second time.

I noticed the UI of the page is different. On the old UI, it works. Old Google log-in interface.

Sorry for my English.

Screenshot 2021-08-30 165538
output-20210830.log

@mattwright324
Copy link
Owner

Hi @turb1te

It seems to be working for me. In your provided log file I do see this interesting bit YouTubeSignIn [loading-page=???? � Google ???????] which is a maybe sign of unicode. I'm wondering since your GitHub profile says Bulgaria that maybe language has a cause in this. The sign in process checks the page title for text Success code=. I'm not sure if it changes language or is always English. However, I don't see anything resembling a success code in the log output and also don't see any errors. The success code would come after the password step which you don't seem to be able to get past.

I am using the standard oauth2 url for the sign in process

public static final String WEB_LOGIN_URL = String.format("https://accounts.google.com/o/oauth2/auth?client_id=%s&redirect_uri=%s&&response_type=code&&scope=%s",
CLIENT_ID, UTF8UrlEncoder.encode(REDIRECT_URI), UTF8UrlEncoder.encode("https://www.googleapis.com/auth/youtube.force-ssl"));

Could you give more detail about the page UI thing?

@turb1te
Copy link
Author

turb1te commented Aug 30, 2021

Hi @mattwright324,

Yes, I'm from Bulgaria and we use Cyrillic. But I always use the English language everywhere. My OS lang is set to EN-US, my Google account too. For that reason when I typed my email it changes the language to English when it asks me for my password. I think that it starts with the Bulgarian (bg) language first because of my IP location. I will send you a video to see the UI thing: (it changes from the old (that one before several years) to the new one)

https://u.pcloud.link/publink/show?code=XZbYydXZ8dWQmvNOEUS53DnytqSRVjCPahLX

(I tried to change the language to EN-US the second time but this doesn't help)

@mattwright324
Copy link
Owner

Certainly doesn't look right.

What is your specific Java version? java -version
Could also help to see the locale settings java -XshowSettings

Locale settings:
    default locale = English (United States)
    default display locale = English (United States)
    default format locale = English (United States)

@turb1te
Copy link
Author

turb1te commented Aug 31, 2021

Certainly doesn't look right.

What is your specific Java version? java -version
Could also help to see the locale settings java -XshowSettings

Locale settings:
    default locale = English (United States)
    default display locale = English (United States)
    default format locale = English (United States)
PS C:\Users\marto> java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) Client VM (build 25.301-b09, mixed mode)
PS C:\Users\marto> java -XshowSettings
VM settings:
    Max. Heap Size (Estimated): 247.50M
    Ergonomics Machine Class: client
    Using VM: Java HotSpot(TM) Client VM

Property settings:
    awt.toolkit = sun.awt.windows.WToolkit
    file.encoding = Cp1252
    file.encoding.pkg = sun.io
    file.separator = \
    java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob = sun.awt.windows.WPrinterJob
    java.class.path = .
    java.class.version = 52.0
    java.endorsed.dirs = C:\Program Files (x86)\Java\jre1.8.0_301\lib\endorsed
    java.ext.dirs = C:\Program Files (x86)\Java\jre1.8.0_301\lib\ext
        C:\WINDOWS\Sun\Java\lib\ext
    java.home = C:\Program Files (x86)\Java\jre1.8.0_301
    java.io.tmpdir = C:\Users\marto\AppData\Local\Temp\
    java.library.path = C:\Program Files (x86)\Common Files\Oracle\Java\javapath
        C:\WINDOWS\Sun\Java\bin
        C:\WINDOWS\system32
        C:\WINDOWS
        C:\Program Files\WindowsApps\Microsoft.PowerShell_7.1.4.0_x64__8wekyb3d8bbwe
        C:\Program Files (x86)\Common Files\Oracle\Java\javapath
        C:\WINDOWS\system32
        C:\WINDOWS
        C:\WINDOWS\System32\Wbem
        C:\WINDOWS\System32\WindowsPowerShell\v1.0\
        C:\WINDOWS\System32\OpenSSH\
        C:\Program Files\dotnet\
        C:\Portable Program Files\YouTube-DL
        C:\Portable Program Files\Google Platform Tools
        C:\Users\marto\AppData\Local\Programs\Python\Python37\Scripts\
        C:\Users\marto\AppData\Local\Programs\Python\Python37\
        C:\Users\marto\AppData\Local\Microsoft\WindowsApps
        .
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.8.0_301-b09
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.specification.version = 1.8
    java.vendor = Oracle Corporation
    java.vendor.url = http://java.oracle.com/
    java.vendor.url.bug = http://bugreport.sun.com/bugreport/
    java.version = 1.8.0_301
    java.vm.info = mixed mode
    java.vm.name = Java HotSpot(TM) Client VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Oracle Corporation
    java.vm.specification.version = 1.8
    java.vm.vendor = Oracle Corporation
    java.vm.version = 25.301-b09
    line.separator = \r \n
    os.arch = x86
    os.name = Windows 10
    os.version = 10.0
    path.separator = ;
    sun.arch.data.model = 32
    sun.boot.class.path = C:\Program Files (x86)\Java\jre1.8.0_301\lib\resources.jar
        C:\Program Files (x86)\Java\jre1.8.0_301\lib\rt.jar
        C:\Program Files (x86)\Java\jre1.8.0_301\lib\sunrsasign.jar
        C:\Program Files (x86)\Java\jre1.8.0_301\lib\jsse.jar
        C:\Program Files (x86)\Java\jre1.8.0_301\lib\jce.jar
        C:\Program Files (x86)\Java\jre1.8.0_301\lib\charsets.jar
        C:\Program Files (x86)\Java\jre1.8.0_301\lib\jfr.jar
        C:\Program Files (x86)\Java\jre1.8.0_301\classes
    sun.boot.library.path = C:\Program Files (x86)\Java\jre1.8.0_301\bin
    sun.cpu.endian = little
    sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
    sun.desktop = windows
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = Cp1252
    sun.management.compiler = HotSpot Client Compiler
    sun.os.patch.level =
    sun.stderr.encoding = cp437
    sun.stdout.encoding = cp437
    user.country = US
    user.dir = C:\Users\marto
    user.home = C:\Users\marto
    user.language = en
    user.name = marto
    user.script =
    user.timezone =
    user.variant =

Locale settings:
    default locale = English
    default display locale = English (United States)
    default format locale = English (United States)
    available locales = , ar, ar_AE, ar_BH, ar_DZ, ar_EG, ar_IQ, ar_JO,
        ar_KW, ar_LB, ar_LY, ar_MA, ar_OM, ar_QA, ar_SA, ar_SD,
        ar_SY, ar_TN, ar_YE, be, be_BY, bg, bg_BG, ca,
        ca_ES, cs, cs_CZ, da, da_DK, de, de_AT, de_CH,
        de_DE, de_GR, de_LU, el, el_CY, el_GR, en, en_AU,
        en_CA, en_GB, en_IE, en_IN, en_MT, en_NZ, en_PH, en_SG,
        en_US, en_ZA, es, es_AR, es_BO, es_CL, es_CO, es_CR,
        es_CU, es_DO, es_EC, es_ES, es_GT, es_HN, es_MX, es_NI,
        es_PA, es_PE, es_PR, es_PY, es_SV, es_US, es_UY, es_VE,
        et, et_EE, fi, fi_FI, fr, fr_BE, fr_CA, fr_CH,
        fr_FR, fr_LU, ga, ga_IE, hi, hi_IN, hr, hr_HR,
        hu, hu_HU, in, in_ID, is, is_IS, it, it_CH,
        it_IT, iw, iw_IL, ja, ja_JP, ja_JP_JP_#u-ca-japanese, ko, ko_KR,
        lt, lt_LT, lv, lv_LV, mk, mk_MK, ms, ms_MY,
        mt, mt_MT, nl, nl_BE, nl_NL, no, no_NO, no_NO_NY,
        pl, pl_PL, pt, pt_BR, pt_PT, ro, ro_RO, ru,
        ru_RU, sk, sk_SK, sl, sl_SI, sq, sq_AL, sr,
        sr_BA, sr_BA_#Latn, sr_CS, sr_ME, sr_ME_#Latn, sr_RS, sr_RS_#Latn, sr__#Latn,
        sv, sv_SE, th, th_TH, th_TH_TH_#u-nu-thai, tr, tr_TR, uk,
        uk_UA, vi, vi_VN, zh, zh_CN, zh_HK, zh_SG, zh_TW

@mattwright324
Copy link
Owner

mattwright324 commented Sep 5, 2021

Still looking into this, having trouble trying to reproduce it locally.

Seems like your java version and locale stuff is fine.

@turb1te
Copy link
Author

turb1te commented Sep 6, 2021

@mattwright324

Look at this: https://u.pcloud.link/publink/show?code=XZjeddXZpzabpfqY3oQfRqzR9QBrXRJvVJhX

I think cookies are the problem. What do you think?

@mattwright324
Copy link
Owner

I managed to reproduce the issue in a vm. It seems it may be caused by something with the java distribution, maybe there was a regression in the Oracle version. If you instead use the Bellsoft Liberica Full (includes necessary javafx dependency) then it seems to work. Standard doesn't work since I think it doesn't include javafx.

Download page
https://bell-sw.com/pages/downloads/

Direct link to full-JRE download
https://download.bell-sw.com/java/8u302+8/bellsoft-jre8u302+8-windows-amd64-full.msi

Part of the issue is that I'm using the embedded javafx browser which is at the mercy of the jdk/jre distribution and version as well as likely not really supported by Google. I've tried looking into alternatives, preferably ones that use the system's default browser instead, but have not had much luck yet.

@mattwright324
Copy link
Owner

It does appear to be the latest Oracle version with the issue,1.8.0_301. It also appears that downgrading back to 1.8.0_291 fixes the issue too.

If you don't want to use Bellsoft Liberica...
https://filehippo.com/download_jre-64/ (maybe not the best download location but the first one I found that worked)

@turb1te
Copy link
Author

turb1te commented Sep 6, 2021

Thank you! I tried Bellsoft Liberica and it worked! But we have another problem...
.
Screenshot 2021-09-06 184740

@mattwright324
Copy link
Owner

A verified warning is expected. However, I don't expect that error to happen. If you scroll down what are the rest of the request details?

@turb1te
Copy link
Author

turb1te commented Sep 6, 2021

This is everything. There is no button to continue.

Screenshot 2021-09-06 192243

@mattwright324
Copy link
Owner

It opens up to that page instantly? This won't do anything to add it into the app though I'm curious if you navigate to the url in your browser instead of the in-app browser if anything is different.

https://accounts.google.com/o/oauth2/auth?client_id=972416191049-htqcmg31u2t7hbd1ncen2e2jsg68cnqn.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.force-ssl

@mattwright324
Copy link
Owner

Trying it myself it may work as an alternative actually to open that url in the system browser. It would require an extra step from the user by Please copy this code but would probably be much more reliable. My original problem was how to get this code at the end since I can't hook into a browser tab to get it from the Success code= in the page title. However, it gives it to you to copy/paste as a user which would be fine with me.

image

@turb1te
Copy link
Author

turb1te commented Sep 6, 2021

It opens up to that page instantly? This won't do anything to add it into the app though I'm curious if you navigate to the url in your browser instead of the in-app browser if anything is different.

accounts.google.com/o/oauth2/auth?client_id=972416191049-htqcmg31u2t7hbd1ncen2e2jsg68cnqn.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.force-ssl

It is the same.

Screenshot 2021-09-06 194502
Screenshot 2021-09-06 194749
Screenshot 2021-09-06 194644
Screenshot 2021-09-06 194654

@turb1te
Copy link
Author

turb1te commented Sep 6, 2021

Trying it myself it may work as an alternative actually to open that url in the system browser. It would require an extra step from the user by Please copy this code but would probably be much more reliable. My original problem was how to get this code at the end since I can't hook into a browser tab to get it from the Success code= in the page title. However, it gives it to you to copy/paste as a user which would be fine with me.

image

I can't get here.

@mattwright324
Copy link
Owner

mattwright324 commented Sep 6, 2021

Well, it seems that the issue is now on me to verify the app, if I can. There seems to be a 100 user cap for unverified apps which looks maxed out and is probably why it isn't working for you and I assume anyone else. Given it is an open source desktop app, it may end up that the user will have to create a project and setup their own OAuth 2.0 Client ID.

I also have my client ID hardcoded in the app which I apparently should not be doing.

Developer credentials may not be embedded in open source projects.

Definitely will need to research more about it.

@mattwright324 mattwright324 added the bug Something's broken or doesn't seem right label Sep 6, 2021
@rmdes
Copy link

rmdes commented May 16, 2023

Having a similar issue
but In my case I can't even go to the app or pick an account to login with :

Java 11
java.version = 11.0.19
javaFX = 11.0.2

image
and the more info links to
image

I would not mind at all being able to add my own Client ID and my own Secret ID app so to avoid the 100 users problems

The link suggested by google to fix the out of band issue : https://developers.google.com/identity/protocols/oauth2/resources/oob-migration?hl=fr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's broken or doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants