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

AppMap answers my question then hides the answer... #989

Open
jswift24 opened this issue Jul 22, 2024 · 11 comments
Open

AppMap answers my question then hides the answer... #989

jswift24 opened this issue Jul 22, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@jswift24
Copy link

I'm using AppMap with vscode on Windows / WSL.

Here's an example where I asked a question, AppMap answered it, then hid (or deleted) the answer.

I can read the answer while AppMap is composing it, but it's gone as soon as the answer is completed.

Please help.

image

Also, I'm unable to join Slack because it says "must use an email address from one of the domains below."

@kgilpin
Copy link
Contributor

kgilpin commented Jul 22, 2024

Hi, thanks for submitting this issue. There is an output log that you can inspect for additional information about what went wrong. It's located in Output | AppMap: Services:

Screen Shot 2024-07-22 at 2 45 15 PM

If possible, please share the output of this window here.

@kgilpin
Copy link
Contributor

kgilpin commented Jul 22, 2024

By the way, is this the Slack URL you are using - https://appmap.io/slack

@jswift24
Copy link
Author

jswift24 commented Jul 22, 2024

Where can I find Output | AppMap: Services? I don't see an output folder. I do see an appmap.log file and temp/appmap/requests... The "output" tab in VSCode shows nothing that seems related to AppMap. It does show INFO traces from database queries only.

Yes, that's the slack link I'm using. Here's the domain restriction:
image

@jswift24
Copy link
Author

Hold on, I think I found it:
Here's the output for AppMap:Services

351545 [Stdout] spawned /home/alonb/.appmap/bin/appmap rpc --port 0 with options {"retryTimes":3,"retryThreshold":180000,"id":"rpc","binPath":"/home/alonb/.appmap/bin/appmap","log":{"name":"AppMap: Services"},"args":["rpc","--port","0"],"env":{"APPMAP_CODE_EDITOR":"vscode","APPMAP_API_URL":"https://api.getappmap.com"}}
351545 [Stderr] --navie-provider option not provided, and none of OPENAI_API_KEY AZURE_OPENAI_API_KEY are available. Using remote Navie provider.
351545 [Stderr] Detected code editor: vscode
351545 [Stderr] Setting RPC configuration: {"projectDirectories":["/mnt/c/Program Files/Microsoft VS Code"],"appmapConfigFiles":["/mnt/c/Program Files/Microsoft VS Code/appmap.yml"]}
351545 [Stderr] RPC handler appmap.filter is deprecated, use appmap.data instead
351545 [Stdout] Available JSON-RPC methods: appmap.data, appmap.filter, appmap.metadata, appmap.sequenceDiagram, appmap.stats, explain, explain.status, search, v1.appmap.stats, v1.configuration.get, v1.configuration.set, v2.appmap.stats, v2.configuration.get, v2.configuration.set
351545 [Stderr] Consult @appland/rpc for request and response data types.
AppMap RPC process listening on port 34375
Pushing workspace configuration to RPC server:
** NO CONFIGURATIONS AVAILABLE **
351545 [Stdout] Running JSON-RPC server on port: 34375
351545 [Stderr] Setting RPC configuration: {"appmapConfigFiles":[],"projectDirectories":["/home/alonb/ragmetrics-app"]}
Authentication changed. Restarting the RPC server
Authentication changed. Restarting the RPC server
351545 [Stdout] /home/alonb/.appmap/bin/appmap rpc --port 0 process has been stopped
354377 [Stdout] spawned /home/alonb/.appmap/bin/appmap rpc --port 0 with options {"retryTimes":3,"retryThreshold":180000,"id":"rpc","binPath":"/home/alonb/.appmap/bin/appmap","log":{"name":"AppMap: Services"},"args":["rpc","--port","0"],"env":{"APPMAP_CODE_EDITOR":"vscode","APPMAP_API_URL":"https://api.getappmap.com","APPMAP_API_KEY":"***"}}
354377 [Stdout] rpc process (354377) already running
354377 [Stderr] --navie-provider option not provided, and none of OPENAI_API_KEY AZURE_OPENAI_API_KEY are available. Using remote Navie provider.
354377 [Stderr] Detected code editor: vscode
354377 [Stderr] Setting RPC configuration: {"projectDirectories":["/mnt/c/Program Files/Microsoft VS Code"],"appmapConfigFiles":["/mnt/c/Program Files/Microsoft VS Code/appmap.yml"]}
354377 [Stderr] RPC handler appmap.filter is deprecated, use appmap.data instead
AppMap RPC process listening on port 34375
Pushing workspace configuration to RPC server:
** NO CONFIGURATIONS AVAILABLE **
354377 [Stdout] Available JSON-RPC methods: appmap.data, appmap.filter, appmap.metadata, appmap.sequenceDiagram, appmap.stats, explain, explain.status, search, v1.appmap.stats, v1.configuration.get, v1.configuration.set, v2.appmap.stats, v2.configuration.get, v2.configuration.set
354377 [Stderr] Consult @appland/rpc for request and response data types.
AppMap RPC process listening on port 35667
Pushing workspace configuration to RPC server:
** NO CONFIGURATIONS AVAILABLE **
354377 [Stdout] Running JSON-RPC server on port: 35667
Failed to sync AppMap configurations
Error: connect ECONNREFUSED 127.0.0.1:34375
354377 [Stderr] Setting RPC configuration: {"appmapConfigFiles":[],"projectDirectories":["/home/alonb/ragmetrics-app"]}
Pushing workspace configuration to RPC server:
- /home/alonb/ragmetrics-app/appmap.yml
354377 [Stderr] Setting RPC configuration: {"appmapConfigFiles":["/home/alonb/ragmetrics-app/appmap.yml"],"projectDirectories":["/home/alonb/ragmetrics-app"]}
354962 [Stdout] spawned /home/alonb/.appmap/bin/appmap index --watch --appmap-dir tmp/appmap with options {"retryTimes":3,"retryThreshold":180000,"id":"index","binPath":"/home/alonb/.appmap/bin/appmap","log":{"name":"AppMap: Services"},"args":["index","--watch","--appmap-dir","tmp/appmap"],"cwd":"/home/alonb/ragmetrics-app","env":{"APPMAP_API_URL":"https://api.getappmap.com","APPMAP_API_KEY":"***"}}
354962 [Stdout] Running indexer in watch mode
354377 [Stderr] (node:354377) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
354377 [Stderr] (Use `appmap --trace-warnings ...` to show where the warning was created)
354377 [Stderr] Explain received context request: projectInfo
354377 [Stderr] Explain received context request: search
354377 [Stderr] Error checking file M
354377 [Stderr] [Error: ENOENT: no such file or directory, stat '/home/alonb/ragmetrics-app/M'] {
354377 [Stderr]   errno: -2,
354377 [Stderr]   code: 'ENOENT',
354377 [Stderr]   syscall: 'stat',
354377 [Stderr]   path: '/home/alonb/ragmetrics-app/M'
354377 [Stderr] }
AppMap RPC process listening on port 35667
Pushing workspace configuration to RPC server:
- /home/alonb/ragmetrics-app/appmap.yml
354377 [Stdout] Indexed 301 files in /home/alonb/ragmetrics-app in 319ms
354377 [Stdout] Wrote file index to /tmp/appmap-files-1721660442965GKEZIq/index.sqlite
354377 [Stdout] Requested char limit: 15894
354377 [Stdout] Collecting context with 5 events per diagram.
354377 [Stderr] Setting RPC configuration: {"appmapConfigFiles":["/home/alonb/ragmetrics-app/appmap.yml"],"projectDirectories":["/home/alonb/ragmetrics-app"]}
354377 [Stdout] Wrote file index to /tmp/appmap-source-17216604441626xg1F7/index.sqlite
354377 [Stdout] Remaining characters before context: 15894
354377 [Stdout] Characterlimit reached.
354377 [Stdout] Added 16203 characters out of a requested limit of 15894.
354377 [Stdout] Collected an estimated 16203 characters.
354377 [Stderr] Explain received context request: projectInfo
354377 [Stderr] Explain received context request: search
354377 [Stderr] Error checking file M
354377 [Stderr] [Error: ENOENT: no such file or directory, stat '/home/alonb/ragmetrics-app/M'] {
354377 [Stderr]   errno: -2,
354377 [Stderr]   code: 'ENOENT',
354377 [Stderr]   syscall: 'stat',
354377 [Stderr]   path: '/home/alonb/ragmetrics-app/M'
354377 [Stderr] }
354377 [Stdout] Indexed 298 files in /home/alonb/ragmetrics-app in 108ms
354377 [Stdout] Wrote file index to /tmp/appmap-files-1721661129417HvzzYz/index.sqlite
354377 [Stdout] Requested char limit: 15894
354377 [Stdout] Collecting context with 5 events per diagram.
354377 [Stdout] Wrote file index to /tmp/appmap-source-1721661137607s3D7KJ/index.sqlite
354377 [Stdout] Remaining characters before context: 15894
354377 [Stdout] Characterlimit reached.
354377 [Stdout] Added 15956 characters out of a requested limit of 15894.
354377 [Stdout] Collected an estimated 15956 characters.
354377 [Stderr] Explain received context request: projectInfo
354377 [Stderr] Explain received context request: search
354377 [Stderr] Error checking file M
354377 [Stderr] [Error: ENOENT: no such file or directory, stat '/home/alonb/ragmetrics-app/M'] {
354377 [Stderr]   errno: -2,
354377 [Stderr]   code: 'ENOENT',
354377 [Stderr]   syscall: 'stat',
354377 [Stderr]   path: '/home/alonb/ragmetrics-app/M'
354377 [Stderr] }
354377 [Stdout] Indexed 299 files in /home/alonb/ragmetrics-app in 126ms
354377 [Stdout] Wrote file index to /tmp/appmap-files-1721669096801SB2ikf/index.sqlite
354377 [Stdout] Requested char limit: 15894
354377 [Stdout] Collecting context with 5 events per diagram.
354377 [Stderr] node:internal/process/promises:288
354377 [Stderr]             triggerUncaughtException(err, true /* fromPromise */);
354377 [Stderr]             ^
354377 [Stderr] 
354377 [Stderr] [Error: EACCES: permission denied, open 'sql_warning.txt'] {
354377 [Stderr]   errno: -13,
354377 [Stderr]   code: 'EACCES',
354377 [Stderr]   syscall: 'open',
354377 [Stderr]   path: 'sql_warning.txt'
354377 [Stderr] }
354377 [Stderr] 
354377 [Stderr] Node.js v18.5.0
354377 [Stderr] exited with code 1
354377 [Stderr] backing off for 2 seconds before restarting
389449 [Stdout] spawned /home/alonb/.appmap/bin/appmap rpc --port 0 with options {"retryTimes":3,"retryThreshold":180000,"id":"rpc","binPath":"/home/alonb/.appmap/bin/appmap","log":{"name":"AppMap: Services"},"args":["rpc","--port","0"],"env":{"APPMAP_CODE_EDITOR":"vscode","APPMAP_API_URL":"https://api.getappmap.com","APPMAP_API_KEY":"***"}}
389449 [Stderr] --navie-provider option not provided, and none of OPENAI_API_KEY AZURE_OPENAI_API_KEY are available. Using remote Navie provider.
389449 [Stderr] Detected code editor: vscode
389449 [Stderr] Setting RPC configuration: {"projectDirectories":["/mnt/c/Program Files/Microsoft VS Code"],"appmapConfigFiles":["/mnt/c/Program Files/Microsoft VS Code/appmap.yml"]}
389449 [Stderr] RPC handler appmap.filter is deprecated, use appmap.data instead
389449 [Stdout] Available JSON-RPC methods: appmap.data, appmap.filter, appmap.metadata, appmap.sequenceDiagram, appmap.stats, explain, explain.status, search, v1.appmap.stats, v1.configuration.get, v1.configuration.set, v2.appmap.stats, v2.configuration.get, v2.configuration.set
389449 [Stderr] Consult @appland/rpc for request and response data types.
AppMap RPC process listening on port 45081
Pushing workspace configuration to RPC server:
- /home/alonb/ragmetrics-app/appmap.yml
389449 [Stdout] Running JSON-RPC server on port: 45081
389449 [Stderr] Setting RPC configuration: {"appmapConfigFiles":["/home/alonb/ragmetrics-app/appmap.yml"],"projectDirectories":["/home/alonb/ragmetrics-app"]}
389449 [Stderr] (node:389449) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
389449 [Stderr] (Use `appmap --trace-warnings ...` to show where the warning was created)
389449 [Stderr] Explain received context request: projectInfo
389449 [Stderr] Explain received context request: search
AppMap RPC process listening on port 45081
Pushing workspace configuration to RPC server:
- /home/alonb/ragmetrics-app/appmap.yml
389449 [Stdout] Indexed 530 files in /home/alonb/ragmetrics-app in 238ms
AppMap RPC process listening on port 45081
Pushing workspace configuration to RPC server:
- /home/alonb/ragmetrics-app/appmap.yml
389449 [Stdout] Wrote file index to /tmp/appmap-files-1721673131633CmNzwz/index.sqlite
389449 [Stdout] Requested char limit: 15894
389449 [Stdout] Collecting context with 5 events per diagram.
389449 [Stderr] Setting RPC configuration: {"appmapConfigFiles":["/home/alonb/ragmetrics-app/appmap.yml"],"projectDirectories":["/home/alonb/ragmetrics-app"]}
389449 [Stderr] Setting RPC configuration: {"appmapConfigFiles":["/home/alonb/ragmetrics-app/appmap.yml"],"projectDirectories":["/home/alonb/ragmetrics-app"]}
389449 [Stdout] Wrote file index to /tmp/appmap-source-1721673132799jJRg7L/index.sqlite
389449 [Stdout] Remaining characters before context: 15894
389449 [Stdout] Characterlimit reached.
389449 [Stdout] Added 16820 characters out of a requested limit of 15894.
389449 [Stdout] Collected an estimated 16820 characters.
389449 [Stderr] Explain received context request: projectInfo
389449 [Stderr] Explain received context request: search
389449 [Stdout] Indexed 530 files in /home/alonb/ragmetrics-app in 176ms
389449 [Stdout] Wrote file index to /tmp/appmap-files-1721673194945YoVYYV/index.sqlite
389449 [Stdout] Requested char limit: 15894
389449 [Stdout] Collecting context with 5 events per diagram.
389449 [Stdout] Wrote file index to /tmp/appmap-source-1721673195300B0x2Ep/index.sqlite
389449 [Stdout] Remaining characters before context: 15894
389449 [Stdout] Characterlimit reached.
389449 [Stdout] Added 16283 characters out of a requested limit of 15894.
389449 [Stdout] Collected an estimated 16283 characters.
389449 [Stderr] Explain received context request: projectInfo
389449 [Stderr] Explain received context request: search
389449 [Stdout] Indexed 530 files in /home/alonb/ragmetrics-app in 169ms
389449 [Stdout] Wrote file index to /tmp/appmap-files-1721673242185qjtGdZ/index.sqlite
389449 [Stdout] Requested char limit: 15894
389449 [Stdout] Collecting context with 5 events per diagram.
389449 [Stdout] Wrote file index to /tmp/appmap-source-17216732424689XiNHF/index.sqlite
389449 [Stdout] Remaining characters before context: 15894
389449 [Stdout] Characterlimit reached.
389449 [Stdout] Added 16202 characters out of a requested limit of 15894.
389449 [Stdout] Collected an estimated 16202 characters.
389449 [Stderr] Explain received context request: projectInfo
389449 [Stderr] Explain received context request: search
389449 [Stdout] Indexed 530 files in /home/alonb/ragmetrics-app in 189ms
389449 [Stdout] Wrote file index to /tmp/appmap-files-172167372541461KZSt/index.sqlite
389449 [Stdout] Requested char limit: 15894
389449 [Stdout] Collecting context with 5 events per diagram.
389449 [Stdout] Wrote file index to /tmp/appmap-source-1721673725764CVt67n/index.sqlite
389449 [Stdout] Remaining characters before context: 15894
389449 [Stdout] Characterlimit reached.
389449 [Stdout] Added 16635 characters out of a requested limit of 15894.
389449 [Stdout] Collected an estimated 16635 characters.
389449 [Stderr] Explain received context request: projectInfo
389449 [Stderr] Explain received context request: search
389449 [Stdout] Indexed 530 files in /home/alonb/ragmetrics-app in 173ms
389449 [Stdout] Wrote file index to /tmp/appmap-files-1721673743416o5v148/index.sqlite
389449 [Stdout] Requested char limit: 15894
389449 [Stdout] Collecting context with 5 events per diagram.
389449 [Stdout] Wrote file index to /tmp/appmap-source-1721673743700eNvufA/index.sqlite
389449 [Stdout] Remaining characters before context: 15894
389449 [Stdout] Characterlimit reached.
389449 [Stdout] Added 16283 characters out of a requested limit of 15894.
389449 [Stdout] Collected an estimated 16283 characters.
389449 [Stderr] Explain received context request: projectInfo
389449 [Stderr] Explain received context request: search
389449 [Stdout] Indexed 530 files in /home/alonb/ragmetrics-app in 227ms
389449 [Stdout] Wrote file index to /tmp/appmap-files-17216737933732kym6f/index.sqlite
389449 [Stdout] Requested char limit: 15894
389449 [Stdout] Collecting context with 5 events per diagram.
389449 [Stdout] Wrote file index to /tmp/appmap-source-1721673793733LyMSsX/index.sqlite
389449 [Stdout] Remaining characters before context: 15894
389449 [Stdout] Characterlimit reached.
389449 [Stdout] Added 16602 characters out of a requested limit of 15894.
389449 [Stdout] Collected an estimated 16602 characters.

@kgilpin kgilpin added the bug Something isn't working label Jul 23, 2024
@dustinbyrne
Copy link
Contributor

What version of the extension are you running?

@jswift24
Copy link
Author

v0.124.0

@petecheslock
Copy link
Contributor

@jswift24 I wanted to let you know that I fixed the invite link on the community slack, if you re-connect to the https://appmap.io/slack URL, you'll then be able to either connect by entering your email or using Google or Apple oauth.

@kgilpin
Copy link
Contributor

kgilpin commented Jul 23, 2024

A quick update - it looks like this file sql_warning.txt is the culprit:

354377 [Stderr] node:internal/process/promises:288
354377 [Stderr]             triggerUncaughtException(err, true /* fromPromise */);
354377 [Stderr]             ^
354377 [Stderr] 
354377 [Stderr] [Error: EACCES: permission denied, open 'sql_warning.txt'] {
354377 [Stderr]   errno: -13,
354377 [Stderr]   code: 'EACCES',
354377 [Stderr]   syscall: 'open',
354377 [Stderr]   path: 'sql_warning.txt'
354377 [Stderr] }

This file is generated by AppMap when it encounters SQL that it can't parse. It looks like there is a conflict being introduced when multiple processes are trying to access this file concurrently.

We are going to work on a couple of things:

  1. Suppress writing of this file unless there is an explicit flag / env var
  2. Update the code to tolerate the case where this file is not writeable

It looks like you are on Mac or Linux (/home/alonb). Can you check the permissions of the file sql_warning.txt? Normally we only see this problem on Windows.

Is there any Docker involved in your setup (e.g. devcontainer)?

@jswift24
Copy link
Author

I'm on Windows Subsystem for Linux (WSL) -- see above

@kgilpin
Copy link
Contributor

kgilpin commented Jul 24, 2024

Here's an issue for this in the appmap-js issue, which is being worked on by @apotterri - getappmap/appmap-js#1902

@kgilpin
Copy link
Contributor

kgilpin commented Jul 30, 2024

@jswift24 we've implemented a fix for this SQL warning. The AppMap tools should update automatically when you restart your IDE, then you can confirm that this error is no longer appearing:

[Error: EACCES: permission denied, open 'sql_warning.txt']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants