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

VS Code extension keeps asking to install Platform Core dependency #47

Closed
fabiosleal opened this issue Jan 17, 2024 · 8 comments
Closed

Comments

@fabiosleal
Copy link

Software

VS Code

Operating System

Linux

Kindly describe the bug and include as much detail as possible on what you were doing so we can reproduce the bug.

Besides Pieces Os, PFD and Chrome extension are working fine, VS Code extension stops, in a way it opens both copilot and pieces explores, but it keeps asking me to install the core dependency.

image

Those are some VS Code's logs that I got:
image
image
image

I don't know if it is relevant/related to.
Every time I click on the cog icon, a new log appears, and nothing shows up.

image

Since the first time, it occurs, the Pieces OS was updated at least two times. After each update, I restart everything, but when I've started VS Code, the Pieces extension still asks me to install the dependencies as I haven't done that yet.

image
image

image
image

@caleb-at-pieces
Copy link
Contributor

Hello @fabiosleal ! Thank you for your bug report. The message to install the core dependency is actually implying that the VS Code extension cannot reach Pieces OS somehow. To get to the bottom of this I have a few questions:

  1. What distro of Linux are you running?
  2. Are you running VS Code in some sort of special remote shell i.e: a dev container, ssh tunnel, or code space?
  3. Are you using an insider build of VS Code? Or the regular production build.

As for the cannot read properties of undefined errors I'm not too sure why that would be happening, it is potentially related to why VS Code cannot establish a connection with Pieces OS however.

We should be able to get you up and running very soon!

@fabiosleal
Copy link
Author

fabiosleal commented Jan 18, 2024

Thanks, @caleb-at-pieces, for your attention!
Feel free to ask for more details.

  1. What distro of Linux are you running?

Pop_OS (22.04 LTS)

  1. Are you running VS Code in some sort of special remote shell i.e: a dev container, ssh tunnel, or code space?

No, nothing special, in fact the extension has been working well, until this message keeps popping up.

  1. Are you using an insider build of VS Code? Or the regular production build.

No, regular one, provided by the official Pop_OS store. I even installed both version apt (deb) and flatpak.
Now I am using the (deb) version.

@caleb-at-pieces
Copy link
Contributor

caleb-at-pieces commented Jan 18, 2024

Hello,

Just to clarify, you are saying the extension is working fine, besides the notification keeps getting shown to download the platform dependency?

If this is the case, then the fix is quite simple on my end, I'll go ahead and add a button to not show the notification again.

In general though, if Pieces OS is running before you boot VS Code the notification should not show up.

@caleb-at-pieces
Copy link
Contributor

caleb-at-pieces commented Jan 18, 2024

Ok I have just released a new version of the VS Code extension: 1.11.1 that I believe fixes this problem.

Changelog is as follows:

  • fix: added button to the 'platform core dependency' notification to not show it again, also adjusted the times at which this notification is shown

Please let me know if this is an accurate solution to this problem and if you still see incorrect behavior!

@fabiosleal
Copy link
Author

Hi @caleb-at-pieces!

Even though it doesn't fix this issue, good job on the updating, and make it easier to use! Thanks!
Screenshot from 2024-01-19 10-54-52

But, my bad, if I couldn't be clear enough.

As I attempt to demonstrate with the images sent here, both tabs appear.

Pieces Explorer shows buttons and a message that says "Successfully refreshed snippets" when you click them. But it doesn't work as expected because some saved snippets don't show up after refreshing.

As you can see in the images, nothing appears in Pieces Copilot.

Could you please demonstrate how to monitor Pieces' error messages, or logs?

@caleb-at-pieces
Copy link
Contributor

Hi @caleb-at-pieces!

Even though it doesn't fix this issue, good job on the updating, and make it easier to use! Thanks! Screenshot from 2024-01-19 10-54-52

But, my bad, if I couldn't be clear enough.

As I attempt to demonstrate with the images sent here, both tabs appear.

Pieces Explorer shows buttons and a message that says "Successfully refreshed snippets" when you click them. But it doesn't work as expected because some saved snippets don't show up after refreshing.

As you can see in the images, nothing appears in Pieces Copilot.

Could you please demonstrate how to monitor Pieces' error messages, or logs?

Thank you for the response, I see now the problem is greater than my proposed solution.

Your Pieces OS logs are stored in /path/to/your/documents/com.pieces.os

The VS Code extension logs can be accessed by clicking on Help on the VS Code toolbar, then selecting Toggle Developer Tools.

Can you kindly send these over to me so I can take a look? Also could you show me the output of pieces-os --debug in your terminal?

@fabiosleal
Copy link
Author

Hi @caleb-at-pieces, better late than never, I bring good news.

Issue: Custom URL not set as an absolute path

Environment Details:

  • Pieces OS version: 7.2.6
  • VS Code Extension version: 1.11.1

Problem Description:
Upon investigating the error I encountered in VS Code Pieces extension, I discovered that the issue was caused by an incorrect configuration of the pieces.customUrl. The error message in the VS Code console indicated a parsing failure for the URL value, e.g., my.pieces.cloud.

Initial Configuration (User Settings):

"pieces.customUrl": "my.pieces.cloud",

Adjusted Configuration (User Settings):

"pieces.customUrl": "https://my.pieces.cloud/",

Console Log:

notificationsAlerts.ts:42 
Please update your Pieces OS.

However, this notification seems to be a generic log, as Pieces OS was already updated, and VS Code was restarted. The error caused disruptions, including breaking Piece's extension, displaying an empty screen in the extension, and affecting other extensions, presumably due to the exception.

Further Investigation:
To confirm that the issue was related to the custom URL setting, I systematically commented out each pieces.<property> line in the user settings and restarted VS Code each time.

Resolution:
The issue persisted until I removed the custom URL setting pieces.customUrl. This resolved the problem, and everything returned to normal functionality.

Modifications Made:

  1. Adjusted pieces.customUrl to use an absolute URL.
  2. Confirmed that the issue was specifically related to the custom URL setting by systematically commenting and restarting.
  3. Deleted the pieces.customUrl setting as I did not comprehend its purpose, resulting in the restoration of normal functionality.

PS:
I did not fully understand the purpose of the pieces.customUrl setting and what value was expected.

Now the issue is definitely closed. Thanks for the attention.

@caleb-at-pieces
Copy link
Contributor

Amazing! Glad you were able to get this sorted out. We are currently doing a release revisiting the notifications you are talking about: the update, install, and failed to connect notifications. Hopefully it will fix up these issues for you nicely.

As for the custom url setting, I can definitely see where you got confused. We can look at how to better explain that setting to users in the future. For now, feel free to read this page on our documentation that explains it: https://docs.pieces.app/product-highlights-and-benefits/connecting-to-a-remote-pieces-os-instance

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

No branches or pull requests

5 participants