-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Exception is thrown with the exmple private-claims.cpp #351
Comments
What message does the exception print? They were not meant to be running a debugger. They are likely just expiring jwt-cpp/example/private-claims.cpp Line 25 in 0d03bc5
You should also check the call stack to see which verification function is failing, it's another way then reading the messages. |
.set_expires_at(time + sec{15} + min{2}) menas that the token will time expire after 2 min 15 sec???just few time the exception araise.. |
I'ts very difficult to see pictures, please keep the screenshot for the IDE. It's hard to follow with your language settings. It be great if you changed it to English (or french or german). You can add jwt-cpp/example/partial-claim-verifier.cpp Lines 89 to 92 in 0d03bc5
And this will print a message that will make ot easier to know what error you are getting. Error 14 (I assume it's token verification) Line 341 in 0d03bc5
Do get the exception if you run the code outside of the debugger? |
you are right ,print "token expired" after i add the code on windows environment. |
i run private-claims.cpp fail in vs2022 debug 64 and vs2017 relaese64 |
Thats pretty odd, ngl. The example sets a expiration of 1h and there should be no way he is halting the program for more than an hour (except on purpose) to debug it. The example seems to work fine on godbolt (or at least it did with the 0.7 release, I don't add master to godbolt). |
|
Oh that example is not ran in CI... 😡 jwt-cpp/example/private-claims.cpp Line 24 in 0d03bc5
Is wrong that should be minus 15 seconds not plus. |
* dev container + vscode extensions * exploring cmake presets for CI * ignore user presets * add configure to build preset windows ran in debug, which means the multi config needs more help * coverage preset * creating a fuzzing preset * fuzzing fix cwd + more configs to preset * move cmake set vars to right section https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170 "You can set C and C++ compilers by using cacheVariables.CMAKE_C_COMPILER and cacheVariables.CMAKE_CXX_COMPILER in a Configure Preset. It's equivalent to passing -D CMAKE_C_COMPILER=<value> and -D CMAKE_CXX_COMPILER=<value> to CMake from the command line." * fix workdir for new fuzz run targets * split up presets into more files * fix include order (liking this less) * add asan to presets * fix copy paste * add asan build preset * move ubsan to presets * replace mustache with a cmake script * touch ups * restore file to void merge conflicts * fix order for args * remove action wrapper more quotes for inputs * revert bad render of boost_json * fix casing * format changes * test to see if output is working * last try * git revert moving mustache to cmake * cmake not enough for presets * drop ci prefix * new test for `library_ROOT` search path * install with presets * cmake --install does not take a preset * install with preset is not yet supported https://gitlab.kitware.com/cmake/cmake/-/issues/23208 * add missing build step * more global fuzzing flags to toolchain file * fixup toolchain in presets * fix pathing and limit configs to tested platforms * clean up + use presets for clang-tidy * dry up sanitizer flags * try install with a preset * remove duplicated test * notes about hunter test * skip checking the compiler since this causes errors with the same CMake uses in combinations with the fuzz sanitizer flag https://github.com/prince-chrismc/jwt-cpp/actions/runs/7481024827/job/20361722539?pr=33 ``` /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x22 CMakeFiles/cmTC_ff7c6.dir/testCCompiler.c.o: in function `main': testCCompiler.c:(.text.main[main]+0x0): multiple definition of `main'; /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o):(.text.main+0x0): first defined here /usr/bin/ld: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o): in function `main': (.text.main+0x12): undefined reference to `LLVMFuzzerTestOneInput' ``` * remove system name to disable cross compiling * tests do not pass clang-tidy * drop toolchain, use target specific flags * leave flags in cmake * missing deps + clean apt files * remove some code duplication * fix typo * devcontainers fix, test and add wolfssl refactored installer to have a script that could be reused * add missing build context * pass version to script * dont use bash syntax * fix typo * upload tar.gz for new releases * revert name to manually trigger it * Update and rename nuget.yml to release.yml * disable nuget for testing * add a zip as well * back to basics * remove remove testing code * update workflow name * enable testing needs to be in the root * add a test preset and use it in some workflows * fix linting tests * bump github actions * bump python setup * drop dev containers * dont install openssl on windows * revert merge conflicts * fix whitespace * fix private claims example to have a valid token #351 * put back versioned format I dont remember why, it looks like it was debugging
What's your question?
it raise a exception
Additional Context
the other example,i can run its well except example\partial-claim-verifier.cpp,because i do not install nlohmann-json。and why private-claims.cpp run fail?
![image](https://private-user-images.githubusercontent.com/25485742/335883177-807aa727-72e7-47fb-9bea-e0728e63027b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTUwNDIsIm5iZiI6MTczODkxNDc0MiwicGF0aCI6Ii8yNTQ4NTc0Mi8zMzU4ODMxNzctODA3YWE3MjctNzJlNy00N2ZiLTliZWEtZTA3MjhlNjMwMjdiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA3NTIyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJiMjVlYTY2MjU2NTBmNWFjMzRhZTZkYWI0OWJjMjQ0ZmQ0NTMzYjIwOGViNDczMTQ5M2FiYzkyZTY4YTA5YzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oqMCFZFEJD622QFeN4My6PIS1T-G7fm9QMvBgy4iW0g)
![image](https://private-user-images.githubusercontent.com/25485742/335883207-bc9c7445-d77b-424e-a082-d8ad90f219d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTUwNDIsIm5iZiI6MTczODkxNDc0MiwicGF0aCI6Ii8yNTQ4NTc0Mi8zMzU4ODMyMDctYmM5Yzc0NDUtZDc3Yi00MjRlLWEwODItZDhhZDkwZjIxOWQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA3NTIyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ5NjllZGQxZjczNjA0MGU5NGFkZDdiNjhjMTZkZDQwZDQwOTNkM2VmYzA0NjFkZDg5ZWU1MWQ5MjI2Mjk2ZTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.p7hSnHZjuTYBSQ4lI-_TCG_6c2SAaXwB89XAii7QYtA)
The text was updated successfully, but these errors were encountered: