Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt6.6 network get "The credentials were not recognized "
Forum Updated to NodeBB v4.3 + New Features

qt6.6 network get "The credentials were not recognized "

Scheduled Pinned Locked Moved Solved General and Desktop
23 Posts 4 Posters 3.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L lingxing

    use QNetworkAccessManager to send http get message,i get the error message "QNetworkReply::UnknownNetworkError : "The credentials were not recognized / Invalid argument"
    "。the request is abort on local machine。i don't know,why i get the error。

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @lingxing Looks like you have to authenticate yourself when accessing that URL. Is that the case?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    L 1 Reply Last reply
    0
    • jsulmJ jsulm

      @lingxing Looks like you have to authenticate yourself when accessing that URL. Is that the case?

      L Offline
      L Offline
      lingxing
      wrote on last edited by
      #3

      @jsulm said in qt6.6 network get "The credentials were not recognized ":

      if i need authenticate, authenticate by compurte or remote url。i meet the case on few machine,and the request seem not touch to server

      jsulmJ 1 Reply Last reply
      0
      • L lingxing

        @jsulm said in qt6.6 network get "The credentials were not recognized ":

        if i need authenticate, authenticate by compurte or remote url。i meet the case on few machine,and the request seem not touch to server

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @lingxing Sorry I don't understand what you're writing.
        I asked whether the web site you're accessing requires authentication or not.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        L 1 Reply Last reply
        0
        • jsulmJ jsulm

          @lingxing Sorry I don't understand what you're writing.
          I asked whether the web site you're accessing requires authentication or not.

          L Offline
          L Offline
          lingxing
          wrote on last edited by
          #5

          @jsulm it's a http request。this is a login case。user pass username and password to login。
          most people it work fine,but a few man it work error。

          jsulmJ JonBJ 2 Replies Last reply
          0
          • L lingxing

            @jsulm it's a http request。this is a login case。user pass username and password to login。
            most people it work fine,but a few man it work error。

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @lingxing said in qt6.6 network get "The credentials were not recognized ":

            user pass username and password to login

            Then you will need to show your code so that others can see how your assembling the GET request with credentials.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • L lingxing

              @jsulm it's a http request。this is a login case。user pass username and password to login。
              most people it work fine,but a few man it work error。

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #7

              @lingxing said in qt6.6 network get "The credentials were not recognized ":

              most people it work fine,but a few man it work error

              As @jsulm says. Show one example of username/password which works and one which does not.

              L 1 Reply Last reply
              0
              • JonBJ JonB

                @lingxing said in qt6.6 network get "The credentials were not recognized ":

                most people it work fine,but a few man it work error

                As @jsulm says. Show one example of username/password which works and one which does not.

                L Offline
                L Offline
                lingxing
                wrote on last edited by
                #8
                This post is deleted!
                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lingxing
                  wrote on last edited by
                  #9

                  fiddle catch with error:
                  ![alt text](1234.jpg image url)

                  fiddle catch with success:
                  1234567.jpg

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    lingxing
                    wrote on last edited by
                    #10

                    qtnetwork:QHttpThreadDelegate log

                    Debug: QHttpThreadDelegate::startRequest() thread= 0x13dc ((null):0, (null))
                    Debug: QHttpThreadDelegate::finishedWithErrorSlot() thread= 0x13dc error= QNetworkReply::UnknownNetworkError "The credentials were not recognized / Invalid argument" ((null):0, (null))

                    when success,the log is :
                    Debug: QHttpThreadDelegate::startRequest() thread= 0x25f4 ((null):0, (null))
                    Debug: QHttpThreadDelegate::headerChangedSlot() thread= 0x25f4 ((null):0, (null))
                    Debug: QHttpThreadDelegate::finishedSlot() thread= 0x25f4 result= 400 ((null):0, (null))

                    jsulmJ 1 Reply Last reply
                    0
                    • L lingxing

                      qtnetwork:QHttpThreadDelegate log

                      Debug: QHttpThreadDelegate::startRequest() thread= 0x13dc ((null):0, (null))
                      Debug: QHttpThreadDelegate::finishedWithErrorSlot() thread= 0x13dc error= QNetworkReply::UnknownNetworkError "The credentials were not recognized / Invalid argument" ((null):0, (null))

                      when success,the log is :
                      Debug: QHttpThreadDelegate::startRequest() thread= 0x25f4 ((null):0, (null))
                      Debug: QHttpThreadDelegate::headerChangedSlot() thread= 0x25f4 ((null):0, (null))
                      Debug: QHttpThreadDelegate::finishedSlot() thread= 0x25f4 result= 400 ((null):0, (null))

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      @lingxing It would be helpful if you would provide information asked (like code or example of username/password)...

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • L Offline
                        L Offline
                        lingxing
                        wrote on last edited by
                        #12

                        something,the problem not happen on sdk qt6.4.3。
                        before i use qt6.4.3 for a long tome,when i update sdk to 6.6.0,meet the problem。

                        JoeCFDJ 1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          lingxing
                          wrote on last edited by
                          #13

                          sample code below
                          link text

                          1 Reply Last reply
                          0
                          • L Offline
                            L Offline
                            lingxing
                            wrote on last edited by
                            #14

                            the situation is blow:

                            • the error occur on a few compture,and always happen。the error happen don't relate to which url i request。every 'https request' will lead to the error。
                            JonBJ 1 Reply Last reply
                            0
                            • L lingxing

                              the situation is blow:

                              • the error occur on a few compture,and always happen。the error happen don't relate to which url i request。every 'https request' will lead to the error。
                              JonBJ Offline
                              JonBJ Offline
                              JonB
                              wrote on last edited by
                              #15

                              @lingxing This is different from what you said previously. What/how have you set up SSL?

                              L 1 Reply Last reply
                              0
                              • JonBJ JonB

                                @lingxing This is different from what you said previously. What/how have you set up SSL?

                                L Offline
                                L Offline
                                lingxing
                                wrote on last edited by lingxing
                                #16

                                @JonB
                                20231113-143953.jpg

                                i only use this code (getrequest.cpp),no other code to set up ssl。
                                do i neet to set up ssl by myself?

                                jsulmJ JonBJ 2 Replies Last reply
                                0
                                • L lingxing

                                  @JonB
                                  20231113-143953.jpg

                                  i only use this code (getrequest.cpp),no other code to set up ssl。
                                  do i neet to set up ssl by myself?

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #17

                                  @lingxing Please post code as text, not pictures.
                                  What @JonB probably means is whether you provide OpenSSL libs together with your application. You can find out if you set QT_DEBUG_PLUGINS env variable to one in the terminal where you start your app and check its output. See https://doc.qt.io/qt-6/debug.html
                                  Also see https://doc.qt.io/qt-5/windows-requirements.html

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  L 1 Reply Last reply
                                  2
                                  • L lingxing

                                    @JonB
                                    20231113-143953.jpg

                                    i only use this code (getrequest.cpp),no other code to set up ssl。
                                    do i neet to set up ssl by myself?

                                    JonBJ Offline
                                    JonBJ Offline
                                    JonB
                                    wrote on last edited by
                                    #18

                                    @lingxing
                                    As @jsulm has said. I don't doubt that your SSL code is correct. You have runtime behaviour which might indicate a problem with SSL/https, you need to check that your runtime OpenSSL is installed and acting correctly.

                                    1 Reply Last reply
                                    0
                                    • jsulmJ jsulm

                                      @lingxing Please post code as text, not pictures.
                                      What @JonB probably means is whether you provide OpenSSL libs together with your application. You can find out if you set QT_DEBUG_PLUGINS env variable to one in the terminal where you start your app and check its output. See https://doc.qt.io/qt-6/debug.html
                                      Also see https://doc.qt.io/qt-5/windows-requirements.html

                                      L Offline
                                      L Offline
                                      lingxing
                                      wrote on last edited by
                                      #19

                                      @jsulm yes,i have libcrypto-3-x64.dll with my application together。because one sdk depend it。 this make effect for my qt application?

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • L lingxing

                                        @jsulm yes,i have libcrypto-3-x64.dll with my application together。because one sdk depend it。 this make effect for my qt application?

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #20

                                        @lingxing As far as I know there are two libraries needed for SSL support: libssl and libcrypto

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        2
                                        • L Offline
                                          L Offline
                                          lingxing
                                          wrote on last edited by
                                          #21

                                          i will try 3ks

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved