Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-104723

qDebug() and console.log() on Android do not print more than ~994 chars

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.9, 5.15.2, 6.4.0 Beta2
    • Quick: Other, WebView
    • None
    • Android

    Description

      Please note, this problem can be recreated without WebView at all.

       

      Having issues on outputting logs (console.log() / qDebug() ) on Android with strings over ~994 characters. Initially I thought this had to do with WebView but it does not, currently this bug is making runtime debugging of longer json files super difficult as they never get outputted with their full length... This problem originally occurred when trying to extract an invalid url from WebView on Android which should've returned a whole userToken for me to use from a customer but only returned a substring of the entire expected string and I was thrown down the wrong trail initially because I thought the actual string value was what was being reported via my debug output..

       

      Running the example application provided in this ticket should fully show the issue, on windows it works fine, on Android however, I cannot seem to either console.log() output or save and use strings above about 994 char length as seen from the following output:

      D libwebview_url_size_bug_armeabi-v7a.so: qml: app complete!

      D libwebview_url_size_bug_armeabi-v7a.so: qml: userTokenUrl: app://token/eyJraWQiOiJyenFURU5LSVdQbDJKOEdGQ1VuTE1QUGZDVVBqN2FWaDJhWCtKaEp0UVBvPSIsImFsZyI6IlJTMjU2In0eyJzdWIiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206bGFzdFNpZ25lZEluIjoiMjAyMi0wNi0yOFQxODowNToxOS43MzdaIiwiY29nbml0bzpncm91cHMiOlsiZmxpZ2h0d2F0Y2gtdXNlcnMiXSwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy13ZXN0LTIuYW1hem9uYXdzLmNvbVwvdXMtd2VzdC0yX2JCbWZMN3hteSIsInBob25lX251bWJlcl92ZXJpZmllZCI6ZmFsc2UsImNvZ25pdG86dXNlcm5hbWUiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206Y29tcGFueSI6IlF0IENvbXBhbnkiLCJvcmlnaW5fanRpIjoiNjAwZjhlZGEtODEwZC00YmQ3LWFhZGUtZDIzNzkyYWU3OWFiIiwiYXVkIjoiNjA1Z2Yyamk5NW05ZGJucXVnOGxmZHQwbXMiLCJldmVudF9pZCI6ImE1YjQ5MDdlLWMwNmMtNDgwYS1iMTc1LWI2OGViM2EwZjNiMyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU2NDQwODY5LCJuYW1lIjoiQnJlbmRhbiBNdXJwaHkiLCJjdXN0b206dGVuYW50IjoiYWlyd2lzZSIsInBob25lX251bWJlciI6IisxNzgxNTIxODc0NSIsImV4cCI6MTY1NjUyNzI2OSwiaWF0IjoxNjU2NDQwODY5LCJqdGkiOiJhOWMyZDViMS0xMzVvvWillThisEvenWorkStar

      D libwebview_url_size_bug_armeabi-v7a.so: qml: original url: app://token/eyJraWQiOiJyenFURU5LSVdQbDJKOEdGQ1VuTE1QUGZDVVBqN2FWaDJhWCtKaEp0UVBvPSIsImFsZyI6IlJTMjU2In0eyJzdWIiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206bGFzdFNpZ25lZEluIjoiMjAyMi0wNi0yOFQxODowNToxOS43MzdaIiwiY29nbml0bzpncm91cHMiOlsiZmxpZ2h0d2F0Y2gtdXNlcnMiXSwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy13ZXN0LTIuYW1hem9uYXdzLmNvbVwvdXMtd2VzdC0yX2JCbWZMN3hteSIsInBob25lX251bWJlcl92ZXJpZmllZCI6ZmFsc2UsImNvZ25pdG86dXNlcm5hbWUiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206Y29tcGFueSI6IlF0IENvbXBhbnkiLCJvcmlnaW5fanRpIjoiNjAwZjhlZGEtODEwZC00YmQ3LWFhZGUtZDIzNzkyYWU3OWFiIiwiYXVkIjoiNjA1Z2Yyamk5NW05ZGJucXVnOGxmZHQwbXMiLCJldmVudF9pZCI6ImE1YjQ5MDdlLWMwNmMtNDgwYS1iMTc1LWI2OGViM2EwZjNiMyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU2NDQwODY5LCJuYW1lIjoiQnJlbmRhbiBNdXJwaHkiLCJjdXN0b206dGVuYW50IjoiYWlyd2lzZSIsInBob25lX251bWJlciI6IisxNzgxNTIxODc0NSIsImV4cCI6MTY1NjUyNzI2OSwiaWF0IjoxNjU2NDQwODY5LCJqdGkiOiJhOWMyZDViMS0xMzVvvWillThisEvenWorkStar

      D libwebview_url_size_bug_armeabi-v7a.so: qml: above should've ended in: WillThisEvenWorkStartingTheTestForWebViewUrlLengthConstraintsNow123456789

       

       

      On Windows, the output I get is as follows:

      eyJraWQiOiJyenFURU5LSVdQbDJKOEdGQ1VuTE1QUGZDVVBqN2FWaDJhWCtKaEp0UVBvPSIsImFsZyI6IlJTMjU2In0eyJzdWIiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206bGFzdFNpZ25lZEluIjoiMjAyMi0wNi0yOFQxODowNToxOS43MzdaIiwiY29nbml0bzpncm91cHMiOlsiZmxpZ2h0d2F0Y2gtdXNlcnMiXSwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy13ZXN0LTIuYW1hem9uYXdzLmNvbVwvdXMtd2VzdC0yX2JCbWZMN3hteSIsInBob25lX251bWJlcl92ZXJpZmllZCI6ZmFsc2UsImNvZ25pdG86dXNlcm5hbWUiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206Y29tcGFueSI6IlF0IENvbXBhbnkiLCJvcmlnaW5fanRpIjoiNjAwZjhlZGEtODEwZC00YmQ3LWFhZGUtZDIzNzkyYWU3OWFiIiwiYXVkIjoiNjA1Z2Yyamk5NW05ZGJucXVnOGxmZHQwbXMiLCJldmVudF9pZCI6ImE1YjQ5MDdlLWMwNmMtNDgwYS1iMTc1LWI2OGViM2EwZjNiMyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU2NDQwODY5LCJuYW1lIjoiQnJlbmRhbiBNdXJwaHkiLCJjdXN0b206dGVuYW50IjoiYWlyd2lzZSIsInBob25lX251bWJlciI6IisxNzgxNTIxODc0NSIsImV4cCI6MTY1NjUyNzI2OSwiaWF0IjoxNjU2NDQwODY5LCJqdGkiOiJhOWMyZDViMS0xMzVvvWillThisEvenWorkStartingTheTestForWebViewUrlLengthConstraintsNow123456789

       

      On Android, the output I get is as follows:

      eyJraWQiOiJyenFURU5LSVdQbDJKOEdGQ1VuTE1QUGZDVVBqN2FWaDJhWCtKaEp0UVBvPSIsImFsZyI6IlJTMjU2In0eyJzdWIiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206bGFzdFNpZ25lZEluIjoiMjAyMi0wNi0yOFQxODowNToxOS43MzdaIiwiY29nbml0bzpncm91cHMiOlsiZmxpZ2h0d2F0Y2gtdXNlcnMiXSwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy13ZXN0LTIuYW1hem9uYXdzLmNvbVwvdXMtd2VzdC0yX2JCbWZMN3hteSIsInBob25lX251bWJlcl92ZXJpZmllZCI6ZmFsc2UsImNvZ25pdG86dXNlcm5hbWUiOiIxNzc3ZjBlYS1hNGM1LTRmNmMtOGJkNy1iNDZhYjQ3MDcxMDciLCJjdXN0b206Y29tcGFueSI6IlF0IENvbXBhbnkiLCJvcmlnaW5fanRpIjoiNjAwZjhlZGEtODEwZC00YmQ3LWFhZGUtZDIzNzkyYWU3OWFiIiwiYXVkIjoiNjA1Z2Yyamk5NW05ZGJucXVnOGxmZHQwbXMiLCJldmVudF9pZCI6ImE1YjQ5MDdlLWMwNmMtNDgwYS1iMTc1LWI2OGViM2EwZjNiMyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU2NDQwODY5LCJuYW1lIjoiQnJlbmRhbiBNdXJwaHkiLCJjdXN0b206dGVuYW50IjoiYWlyd2lzZSIsInBob25lX251bWJlciI6IisxNzgxNTIxODc0NSIsImV4cCI6MTY1NjUyNzI2OSwiaWF0IjoxNjU2NDQwODY5LCJqdGkiOiJhOWMyZDViMS0xMzVvvWillThisEvenWorkStar

       

      So the suffix I've attached is consistently truncated and cut off, both in simply returning an assigned string from QML and from retrieving it from the property value.

       

      Attachments

        Issue Links

          Activity

            People

              qtandroidteam Qt Android Team
              brendan Brendan Murphy
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: