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

TAKX Failed to Query Contact List #115

Open
jasonmhitegtc opened this issue Jan 22, 2025 · 19 comments
Open

TAKX Failed to Query Contact List #115

jasonmhitegtc opened this issue Jan 22, 2025 · 19 comments

Comments

@jasonmhitegtc
Copy link

Hello, first off big fan of OTS it's been a big help to me working with TAK and is a pleasure to use, especially compared to some of the other options for servers. Please add a donation link so I can buy you a beer.

Recently I started playing with TAKX from tak.gov, which I think is not publicly available yet so the tl;dr is it's a merging of WinTAK and RaptorX that is seemingly going to eventually replace those two products on desktop (it supports Windows and Linux). I assume it'll be made available to non-government users at some point.

Anyway, it seems to mostly work with OTS. I was able to auto-enroll with my OTS server and it connects successfully etc, except that it give me the error message "Failed to Query Contact List" on connection and periodically, presumably whenever it is pinging the server. There are no error messages about this in the TAKX console, nor do I get any errors in the OTS logs. I'm not sure what the impact is, either, as I seem to at least have basic functionality to see other devices on the map, send them chat messages/markers/etc, but clearly something is wrong.

I'm not sure how to proceed with debugging, but I can do whatever you suggest that might be helpful to figure out what the issue actually is.

@brian7704
Copy link
Owner

brian7704 commented Jan 22, 2025

I'm glad to hear that TAKX is mostly working with OTS. Unfortunately I won't have access to it until it's public. I added a section about supporting this project at the bottom of the README.

Can you set DEBUG: true in ~/ots/config.yml, restart the service with sudo systemctl restart opentakserver and then trigger the error again? Then you can post ~/ots/logs/opentakserver.log here.

That should show what API call it's making. My guess is that it's making a call to an endpoint in the Marti API that I haven't implemented yet. If so, that will be an easy fix.

@jasonmhitegtc
Copy link
Author

I did actually try running it with debug, but none of the log messages looked particularly informative about what it was trying to do. Still, here you go. This is a fresh session with OTS just restarted, and no other clients connected. I launched TAKX, let it connect, got the error message, then closed it.

[2025-01-22 15:16:00,953] - OpenTAKServer[199211] - app - init_extensions - 68 - INFO - OpenTAKServer 1.4.2
[2025-01-22 15:16:00,954] - OpenTAKServer[199211] - app - init_extensions - 69 - INFO - Loading the database...
[2025-01-22 15:16:00,962] - OpenTAKServer[199211] - certificate_authority - create_ca - 111 - DEBUG - CA already exists
[2025-01-22 15:16:01,268] - OpenTAKServer[199211] - app - main - 272 - DEBUG - Starting in debug mode
[2025-01-22 15:16:01,274] - OpenTAKServer[199211] - app - main - 314 - INFO - Mumble authentication handler disabled
[2025-01-22 15:16:49,564] - OpenTAKServer[199211] - SocketServer - run - 37 - INFO - New SSL connection from 192.168.66.2
[2025-01-22 15:16:49,587] - OpenTAKServer[199211] - client_controller - __init__ - 65 - DEBUG - Got common name tak2go-c2
[2025-01-22 15:16:50,066] - OpenTAKServer[199211] - client_controller - run - 182 - DEBUG - b'<?xml version="1.0"?>\n<auth><cot username="tak2go-c2" password="redacted" uid="d2de32d4-c57b-51ef-8e65-04d2f8a07921"/></auth>'
[2025-01-22 15:16:50,068] - OpenTAKServer[199211] - client_controller - run - 209 - INFO - tak2go-c2 is ID'ed by cert
[2025-01-22 15:17:05,041] - OpenTAKServer[199211] - client_controller - run - 182 - DEBUG - b'<?xml version="1.0"?>\n<event version="2.0" uid="d2de32d4-c57b-51ef-8e65-04d2f8a07921-ping" type="t-x-c-t" time="2025-01-22T22:17:05.029Z" start="2025-01-22T22:17:05.029Z" stale="2025-01-22T22:17:15.029Z" how="m-g"><point lat="0.00000000" lon="0.00000000" hae="0.00000000" ce="9999999" le="9999999"/><detail/></event>'
[2025-01-22 15:17:20,124] - OpenTAKServer[199211] - client_controller - run - 182 - DEBUG - b'<?xml version="1.0"?>\n<event version="2.0" uid="d2de32d4-c57b-51ef-8e65-04d2f8a07921-ping" type="t-x-c-t" time="2025-01-22T22:17:20.113Z" start="2025-01-22T22:17:20.113Z" stale="2025-01-22T22:17:30.113Z" how="m-g"><point lat="0.00000000" lon="0.00000000" hae="0.00000000" ce="9999999" le="9999999"/><detail/></event>'
[2025-01-22 15:17:21,060] - OpenTAKServer[199211] - client_controller - run - 119 - WARNING - Closing connection to 192.168.66.2
[2025-01-22 15:17:21,061] - OpenTAKServer[199211] - client_controller - send_disconnect_cot - 343 - INFO - 192.168.66.2 disconnected
[2025-01-22 15:17:24,591] - OpenTAKServer[199211] - client_controller - on_close - 97 - INFO - Connection closed for 192.168.66.2: (200, 'Normal shutdown')
[2025-01-22 15:17:24,592] - OpenTAKServer[199211] - client_controller - on_close - 97 - INFO - Connection closed for 192.168.66.2: (200, 'Normal shutdown')

@brian7704
Copy link
Owner

That's strange, in debug mode I expected it to add each HTTP request to the log. But we should also be able to see that in the nginx logs too. Can you post /etc/nginx/logs/access.log?

@jasonmhitegtc
Copy link
Author

jasonmhitegtc commented Jan 22, 2025

This captures me re-doing certificate enrollment, connecting, getting the error message.

192.168.66.2 - - [22/Jan/2025:15:42:10 -0700] "GET /socket.io/?EIO=4&transport=polling&t=PIGBY9x HTTP/1.1" 200 118 "https://tak2go.gtc-ai.com/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0"
192.168.66.2 - - [22/Jan/2025:15:42:10 -0700] "POST /socket.io/?EIO=4&transport=polling&t=PIGBYA9&sid=USVscaQaang4ap1hAAAE HTTP/1.1" 200 2 "https://tak2go.gtc-ai.com/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0"
192.168.66.2 - - [22/Jan/2025:15:42:10 -0700] "GET /socket.io/?EIO=4&transport=polling&t=PIGBYAA&sid=USVscaQaang4ap1hAAAE HTTP/1.1" 200 43 "https://tak2go.gtc-ai.com/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0"
192.168.66.2 - - [22/Jan/2025:15:42:10 -0700] "GET /socket.io/?EIO=4&transport=polling&t=PIGBYAN&sid=USVscaQaang4ap1hAAAE HTTP/1.1" 200 1 "https://tak2go.gtc-ai.com/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0"
192.168.66.2 - - [22/Jan/2025:15:42:10 -0700] "GET /socket.io/?EIO=4&transport=polling&t=PIGBYAl&sid=USVscaQaang4ap1hAAAE HTTP/1.1" 200 1 "https://tak2go.gtc-ai.com/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0"
192.168.66.2 - tak2go-c2 [22/Jan/2025:15:42:38 -0700] "GET /Marti/api/tls/config HTTP/1.1" 200 225 "-" "-"
192.168.66.2 - tak2go-c2 [22/Jan/2025:15:42:39 -0700] "POST /Marti/api/tls/signClient/v2?clientUid=83dd26d4-dfdd-5ec8-9d06-f43eeb1cd32a&version=5.2.0 HTTP/1.1" 200 2949 "-" "-"
192.168.66.2 - - [22/Jan/2025:15:42:40 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"
192.168.66.2 - - [22/Jan/2025:15:42:50 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"
192.168.66.2 - - [22/Jan/2025:15:43:00 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"
192.168.66.2 - - [22/Jan/2025:15:43:10 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"
192.168.66.2 - - [22/Jan/2025:15:43:10 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"

An interesting note as well: I'm getting this on TAKX version 5.2 (the current release version). I tried uninstalling that and installing TAKX 5.1 and it does not give the error message. So possibly related to a new feature in TAKX hitting an unimplemented endpoint in OTS (presumably that oauth one?), or maybe just a bug in TAKX.

@jasonmhitegtc
Copy link
Author

jasonmhitegtc commented Jan 22, 2025

Capturing the same log but using TAKX 5.1, it's slightly different but I think only because I clicked on the map in OTS web while gathering the previous log. I guess the oauth call is what's making it angry, but maybe TAXK 5.1 just ignores it.

192.168.66.2 - tak2go-c2 [22/Jan/2025:16:02:46 -0700] "GET /Marti/api/tls/config HTTP/1.1" 200 225 "-" "-"
192.168.66.2 - tak2go-c2 [22/Jan/2025:16:02:47 -0700] "POST /Marti/api/tls/signClient/v2?clientUid=d71f4293-0280-54f7-9b37-73b5bd429e08 HTTP/1.1" 200 2949 "-" "-"
192.168.66.2 - - [22/Jan/2025:16:02:48 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"
192.168.66.2 - - [22/Jan/2025:16:02:48 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"
192.168.66.2 - - [22/Jan/2025:16:02:48 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"
192.168.66.2 - - [22/Jan/2025:16:02:58 -0700] "POST /oauth/token?password=redacted&grant_type=password&username=tak2go-c2 HTTP/1.1" 404 162 "-" "Java/17.0.8.1"

@jasonmhitegtc
Copy link
Author

jasonmhitegtc commented Jan 22, 2025

Aha, TAKX 5.1 seems to show an error in its own log when 5.2 does not for whatever reason. It's looking for that oauth endpoint:

java.util.concurrent.CompletionException: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as tak2go-c2
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:211)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as tak2go-c2
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:116)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:206)
	... 7 more
Caused by: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as tak2go-c2
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider$SessionHandler.getSession(ApiProvider.java:545)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.fillHeaders(ApiProvider.java:298)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.lambda$createAuthorizedApiClient$7(ApiProvider.java:273)
	at io.github.openfeign//feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:124)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:91)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy218.getClientEndpoints(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:111)
	... 8 more
Caused by: gov.takx.commons.lang.ExceptionUtils$RedactedException: NotFound: [404 Not Found] during [POST] to [https://tak2go.gtc-ai.com:8446/oauth/token?**REDACTED**

It also is complaining about hitting a similar endpoint when fetching missions

java.util.concurrent.CompletionException: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as tak2go-c2
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:211)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as tak2go-c2
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:116)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:206)
	... 7 more
Caused by: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as tak2go-c2
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider$SessionHandler.getSession(ApiProvider.java:545)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.fillHeaders(ApiProvider.java:298)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.lambda$createAuthorizedApiClient$7(ApiProvider.java:273)
	at io.github.openfeign//feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:124)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:91)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy214.getAllMissions(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:111)
	... 8 more
Caused by: gov.takx.commons.lang.ExceptionUtils$RedactedException: NotFound: [404 Not Found] during [POST] to [https://tak2go.gtc-ai.com:8446/oauth/token?**REDACTED**

@brian7704
Copy link
Owner

Thanks, those logs are helpful. I'll review them and let you know when a fix is ready.

@brian7704
Copy link
Owner

I actually added /oauth/token a month or so ago when I was adding support for CloudTAK, but I forgot to add the nginx config to the installer script. In /etc/nginx/sites-available/ots_certificate_enrollment there is a stanza that starts with location /Marti/api/tls. Under that stanza, add the following.

location /oauth {
    proxy_pass http://127.0.0.1:8081;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
}

Then run sudo nginx -t to make sure there are no typos. You might see some warnings, but as long as you see nginx: configuration file /etc/nginx/nginx.conf test is successful at the end, you can restart nginx with sudo systemctl restart nginx. That should take care of the 404 errors.

@jasonmhitegtc
Copy link
Author

jasonmhitegtc commented Jan 23, 2025

Modified nginx config, log now shows status 200 for the oauth requests but throwing an error about the contact list and/or fetching missions, presumably if you only added support for that recently I may have not pulled that update. I'm on 1.4.1 (commit ga792eaa) despite having installed this particular one just a couple weeks ago... not sure why it didn't at least pull 1.4.2, which I see mentions CloudTAK support in the release notes.

Actually hmm, I ran the ubuntu updater script, but the webui is still showing being on 1.4.1.

Image

buuuuuut:

Image

Also worth noting, I've had trouble with WinTAK not being able to subscribe to missions on OTS, and by "trouble" I mean it receives and accepts the invitation then just fails to subscribe. Possibly related?

@brian7704
Copy link
Owner

brian7704 commented Jan 23, 2025

What does ~/.opentakserver_venv/bin/pip show opentakserver show? Also do you see any other 404 errors in /var/log/nginx/access.log besides the ones for /oauth/token?

@jasonmhitegtc
Copy link
Author

jasonmhitegtc commented Jan 23, 2025

tak@taksvr:~$ ./.opentakserver_venv/bin/pip show opentakserver
Name: OpenTAKServer
Version: 1.4.2
Summary: A server for ATAK, WinTAK, and iTAK
Home-page: https://github.com/brian7704/OpenTAKServer
Author: OpenTAKServer
Author-email: [email protected]
License: GPL-3.0-or-later
Location: /home/tak/.opentakserver_venv/lib/python3.12/site-packages
Requires: adsbxcot, aiscot, androguard, beautifulsoup4, colorlog, datetime, eventlet, flask, flask-apscheduler, flask-cors, flask-migrate, Flask-Security-Too, flask-socketio, flask-sqlalchemy, gevent, lastversion, lxml, meshtastic, pika, poetry-dynamic-versioning, protobuf, psutil, pyfiglet, pygc, PyJWT, pyOpenSSL, pyotp, pytak, pytest, pytest-cov, python-ffmpeg, python-socketio, PyYAML, sqlalchemy, sqlalchemy-utils, tldextract, unishox2-py3

So I guess that's ok.

The access log shows nothing else, just

192.168.66.2 - - [23/Jan/2025:10:07:58 -0700] "POST /oauth/token?username=tak2go-c2&grant_type=password&password=redactedy HTTP/1.1" 200 552 "-" "Java/17.0.8.1"

over and over. Note that it's now status 200 after editing the nginx config, but I'm guessing the backend isn't answering.

I also tried turning DEBUG back on in OTS under the thought that maybe it was never hitting the endpoint in the backend with the old nginx config, but I don't see any new or relevant messages in the ots logs either.

@brian7704
Copy link
Owner

Do you have an account on the public server or could you make one? Then I could watch the logs and traffic while you use TAKX to reproduce the issue.

@jasonmhitegtc
Copy link
Author

Sure thing, just made an account and connected TAKX. Same error message, though I note that the webui on the public server does say version 1.4.1, hmm.

I'll leave TAKX connected, lemme know if you need any info.

@brian7704
Copy link
Owner

Thanks, I'm checking the logs now. Though it's strange that you're seeing version 1.4.1 on the public server. It's showing as 1.4.2 for me

@jasonmhitegtc
Copy link
Author

jasonmhitegtc commented Jan 23, 2025

I was seeing 1.4.2 on the public server, versus mine (that is seemingly up to date) shows 1.4.1.

HOWEVER now my OTS is saying 1.4.2 for OTS and 1.42 for the UI in the webui version block. Might have just been browser cache or something that it was still saying 1.4.1, so disregard.

@brian7704
Copy link
Owner

I looked through the public server logs but I can't see TAKX making any requests for missions or contacts. Could you post the TAKX error it's throwing now? Before it was caused by the 404 error for /oauth/token but that's returning 200 now.

@jasonmhitegtc
Copy link
Author

Image
Clicking into the exception:

java.util.concurrent.CompletionException: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as jhite
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:211)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as jhite
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:116)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:206)
	... 7 more
Caused by: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as jhite
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider$SessionHandler.getSession(ApiProvider.java:545)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.fillHeaders(ApiProvider.java:298)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.lambda$createAuthorizedApiClient$7(ApiProvider.java:273)
	at io.github.openfeign//feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:124)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:91)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy213.getAllMissions(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:111)
	... 8 more
Caused by: gov.takx.commons.lang.ExceptionUtils$RedactedException: FeignException: Cannot construct instance of `gov.tak.api.comms.takserver.mission.data.Session`, problem: `java.lang.IllegalArgumentException`
 at [Source: (BufferedReader); line: 3, column: 1] reading POST https://public.opentakserver.io:8446/oauth/token?**REDACTED**
Caused by: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `gov.tak.api.comms.takserver.mission.data.Session`, problem: `java.lang.IllegalArgumentException`
 at [Source: (BufferedReader); line: 3, column: 1]
	at [email protected]//com.fasterxml.jackson.databind.exc.ValueInstantiationException.from(ValueInstantiationException.java:47)
	at [email protected]//com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:2058)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapAsJsonMappingException(StdValueInstantiator.java:598)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.rewrapCtorProblem(StdValueInstantiator.java:621)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:293)
	at [email protected]//com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:301)
	at [email protected]//com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:202)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:525)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1409)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:352)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:185)
	at [email protected]//com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at [email protected]//com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825)
	at [email protected]//com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3801)
	at io.github.openfeign//feign.jackson.JacksonDecoder.decode(JacksonDecoder.java:65)
	at io.github.openfeign//feign.InvocationContext.proceed(InvocationContext.java:36)
	at io.github.openfeign//feign.ResponseHandler.decode(ResponseHandler.java:125)
	at io.github.openfeign//feign.ResponseHandler.handleResponse(ResponseHandler.java:76)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:114)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy217.login(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.feign.FeignSessionApi.login(FeignSessionApi.java:37)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
	at io.github.openfeign//feign.DefaultMethodHandler.invoke(DefaultMethodHandler.java:141)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy217.login(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider$SessionHandler.getSession(ApiProvider.java:540)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.fillHeaders(ApiProvider.java:298)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.lambda$createAuthorizedApiClient$7(ApiProvider.java:273)
	at io.github.openfeign//feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:124)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:91)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy213.getAllMissions(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:111)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:206)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at [email protected]//com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:128)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:291)
	... 39 more

Also:

Image

java.util.concurrent.CompletionException: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as jhite
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:211)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: gov.tak.api.comms.takserver.mission.call.ApiException: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as jhite
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:116)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:206)
	... 7 more
Caused by: gov.tak.api.comms.takserver.mission.MissionApiAuthenticationException: Failed to log in as jhite
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider$SessionHandler.getSession(ApiProvider.java:545)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.fillHeaders(ApiProvider.java:298)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.lambda$createAuthorizedApiClient$7(ApiProvider.java:273)
	at io.github.openfeign//feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:124)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:91)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy218.getClientEndpoints(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:111)
	... 8 more
Caused by: gov.takx.commons.lang.ExceptionUtils$RedactedException: FeignException: Cannot construct instance of `gov.tak.api.comms.takserver.mission.data.Session`, problem: `java.lang.IllegalArgumentException`
 at [Source: (BufferedReader); line: 3, column: 1] reading POST https://public.opentakserver.io:8446/oauth/token?**REDACTED**
Caused by: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `gov.tak.api.comms.takserver.mission.data.Session`, problem: `java.lang.IllegalArgumentException`
 at [Source: (BufferedReader); line: 3, column: 1]
	at [email protected]//com.fasterxml.jackson.databind.exc.ValueInstantiationException.from(ValueInstantiationException.java:47)
	at [email protected]//com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:2058)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapAsJsonMappingException(StdValueInstantiator.java:598)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.rewrapCtorProblem(StdValueInstantiator.java:621)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:293)
	at [email protected]//com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:301)
	at [email protected]//com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:202)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:525)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1409)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:352)
	at [email protected]//com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:185)
	at [email protected]//com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at [email protected]//com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825)
	at [email protected]//com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3801)
	at io.github.openfeign//feign.jackson.JacksonDecoder.decode(JacksonDecoder.java:65)
	at io.github.openfeign//feign.InvocationContext.proceed(InvocationContext.java:36)
	at io.github.openfeign//feign.ResponseHandler.decode(ResponseHandler.java:125)
	at io.github.openfeign//feign.ResponseHandler.handleResponse(ResponseHandler.java:76)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:114)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy217.login(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.feign.FeignSessionApi.login(FeignSessionApi.java:37)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
	at io.github.openfeign//feign.DefaultMethodHandler.invoke(DefaultMethodHandler.java:141)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy217.login(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider$SessionHandler.getSession(ApiProvider.java:540)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.fillHeaders(ApiProvider.java:298)
	at takx-shared//gov.tak.api.comms.takserver.mission.ApiProvider.lambda$createAuthorizedApiClient$7(ApiProvider.java:273)
	at io.github.openfeign//feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:124)
	at io.github.openfeign//feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:91)
	at io.github.openfeign//feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
	at io.github.openfeign//feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)
	at takx-shared/jdk.proxy8/jdk.proxy8.$Proxy218.getClientEndpoints(Unknown Source)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.get(AbstractEndpointCaller.java:111)
	at takx-shared//gov.tak.api.comms.takserver.mission.call.AbstractEndpointCaller.wrapAsync(AbstractEndpointCaller.java:206)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.IllegalArgumentException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at [email protected]//com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:128)
	at [email protected]//com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:291)
	... 39 more

@brian7704
Copy link
Owner

Caused by: gov.takx.commons.lang.ExceptionUtils$RedactedException: FeignException: Cannot construct instance of `gov.tak.api.comms.takserver.mission.data.Session`, problem: `java.lang.IllegalArgumentException`
 at [Source: (BufferedReader); line: 3, column: 1] reading POST https://public.opentakserver.io:8446/oauth/token?**REDACTED**

My guess is that this means that OTS isn't returning the token in the format that TAKX expects. Unfortunately the only way to figure out that format is to reverse engineer how it works with the tak.gov server, but I don't have access to TAKX. I think figuring out that format will probably fix the other errors you're getting

@jasonmhitegtc
Copy link
Author

Makes sense, I figured it was something along those lines. I'll try to take a look look through the TAK developer documentation and see if I can find anything, otherwise I guess just leave this until TAKX is public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants