@thirdweb-dev/auth API vulnerability

Issue
When sending a blank GET request to /api/auth/login using @thirdweb/auth in Next.js (and Express.js as well) the whole server crashes because of an unexpected token in this line of code.
This might be a vulnerability because this is a way to crash the whole backend with one single request.
Also to mention that the atob method used here is deprecated.
const payload = JSON.parse(atob(req.query.payload as string)) as LoginPayload;

The error
error -<EMAIL_ADDRESS>(20:0) @ handler$2
error - SyntaxError: Unexpected token º in JSON at position 0
    at JSON.parse (<anonymous>)

Possible solutions

Replace the deprecated atob method with the modern Buffer.from method.
Handle the case where the req.query.payload is null or undefined.
Catch server errors in the whole route handler.

Good day ser. I'm trying to code along the token-gated NFT tutorial by Thirdweb in this article:
https://blog.thirdweb.com/guides/nft-gated-website/
However, during installation of the Auth SDK, I get an error about NextJS13 conflict. I tried using legacy-peer-deps, however after installation, no data could be pulled from ThirdWebAuth. Might you know what's the issue here?


Provenance of artifact

Hi,
once the provenance is generated, is there we can verify that artifact has not been tampered during deployment step and same artifact is being deployed from trusted source ?

Hi,
That would be a separate process that you compare the hash in the provenance with what is running in your production environment. Do you have a use case you can elaborate on?

As part of CI pipeline SLSA step is used which will generate build provenance (commit sha) and during release pipeline in Azure DevOps, We wanted to check if the same artifact is being deployed to prove integrity is maintained through out the pipeline as it goes to different environment targets ( provenance to be verified at production deployment stage).


Accept: Campaign Entry Creation

Description
Acceptance Test for #252

The ability to create entries related to a campagin and have those entries automatically created for other users in your campagin
UAT Environment for executing the acceptance flow
See #445 for automation of this flow
Acceptance Flow

User logs in
User joins a campaign or chooses one they are already registered for
User clicks the title of the campaign they've chosen to see the details of the campaign
User clicks the "Entry" button
User fills out the details for the entry
User clicks save
User observes that the entries were created for themselves as well as all users in their campaign
User creates a new campaign in which they are the DM
User navigates to the Campaign's detail screen by clicking it's title
User clicks "DM Entry" and creates an entry for the campaign
User observes that the entry was created for themselves as well as other characters in the campaign

Everything works perfectly! Approved!
-Kate Ruscito

Everything works perfectly! Approved!
NOTE: I would probably add to the text that the event will show up in 15 minutes so people don’t think they didn’t mess up!
-Kate Ruscito


Pass fixed query parameters to dynamic options

Description
Currently we can add a mapping configuration to an field using options ref https://docs.altinn.studio/app/development/data/options/#pass-query-parameters-when-fetching-options. This will add a named query parameter with the value of the mapped datamodel. This in turn can be picked up by another field using dynamic codelists providing a way to filter it's values.
Some dynamic codelists provide large hierarchical structures including sorting, filtering and other options to display only the relevant options for the client.
I would like to be able to add fixed query parameters to as part of the options/codelist configuration allowing for the same optionsId to be used on multiple fields but with different parameters effectively making the dynamic codelist provider returning different values.
Additional Information
This could be done by using the current mapping configuration but allowing for mappings not in the datamodel.
  "mapping": {"level": "1"}

Level in this case is just the name of the query parameter to be added and the value is constant and not based on the datamodel.
Tasks
No response
Acceptance Criterias
No response

The rule should probably not be
if(string is valid datmodel key)
then (lookup value in data model)
else (send raw value)

because that would make validations of the lookup impossible.
maybe support expressions that evaluate to string instead? That way a literal would be ["1"] instead and altinn studio could convert the old strings to ["dataModel","key.value"] for consistency?

The example provided is necessarily not something that needs to be implemented as-is. It was just the closest thing to the needed behavior. And given your point on validation, it should probably be a separate configuration or expression support as suggested.


Support for integer property control

Hi!
I am in the process of adding ISF support to my image editor.
Going through the standard shaders there are a bunch of controls like this:
{
    "DEFAULT": 1,
    "LABEL": "Horizontal Repeat",
    "LABELS": [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
        ],
    "NAME": "horizontalRepeat",
    "TYPE": "long",
    "VALUES": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9
        ]
}

These end up being represented as a pull-down control on the website:

This is really just an integer though and I would rather have it represented by a slider, just like "float". Would it be possible to add an "int" control type to the spec so that the above would look like this:
{
    "DEFAULT": 1,
    "LABEL": "Horizontal Repeat",
    "MAX": 9,
    "MIN": 1,
    "NAME": "horizontalRepeat",
    "TYPE": "int"
}

+1


typeguard-3.0.0 seems to break TZAware

Hey there, thanks for the wonderful library!
I don't have the time to dig much more right now but just as a heads up, typeguard-3.0.0 seems to break TZAware.
Our CI started failing between yesterday and today and the only library that got updated was typeguard, which is only pulled by phantom-types in our case.
Here's what FastAPI + Pydantic gives us with typeguard-3.0.0:
{
  "detail": [
    {
      "loc": [
        "body",
        "startsAt"
      ],
      "msg": "Value is not within bound of 'str': '2023-03-15T19:53:09.772675+00:00'",
      "type": "type_error.bound"
    },
    {
      "loc": [
        "body",
        "endsAt"
      ],
      "msg": "Value is not within bound of 'str': '2023-03-15T20:53:09.772675+00:00'",
      "type": "type_error.bound"
    }
  ]
}

@ramnes Thanks for reporting this. It looks like typeguard 3.0.0 has a flurry of breaking changes. I'll make sure to get a version of phantom-types out that pins to <3 (less than 3, not a heart 😅) ASAP.
I'll then look into supporting version 3+. Specifically the behavior change to no longer check all items of collections by default looks problematic, and makes me wonder whether the exposed API is thread safe.

If you feel like working on the quick-fix (pin typeguard + bump patch version), that could help getting a fix out slightly faster, otherwise I'll get to it by end of today hopefully.

There you go: #270 :)

FYI, I raised the issue about thread safety with the new typeguard global config: https://github.com/agronholm/typeguard/issues/316


does not work on derived classes?

Hello,
I'm no python specialist, just a regular user.
I derived a class from Feature but then, turfpy operations on those derived classes no longer work...
from geojson import Point, Feature
from turfpy.measurement import distance

class Vertex(Feature):
    def __init__(self, node: str, point: Point):
        Feature.__init__(self, geometry=point)
        self.nodeid = node

p1 = Point((25.25458, 51.623879))
f1 = Feature(geometry=p1)
v1 = Vertex("v1", point=p1)
p2 = Point((25.254626, 51.624053))
f2 = Feature(geometry=p2)
v2 = Vertex("v2", point=p2)

df = distance(f1, f2)
print("df: ",df)  # df:  0.019606799666682842

print("v1 is feature?", isinstance(v1, Feature))  # true

dv = distance(v1, v2)
print("dv: ", dv)
# Error:
# Traceback (most recent call last):
#   File "ft.py", line 19, in <module>
#     dv = distance(v1, v2)
#   File "/usr/local/miniconda3/lib/python3.9/site-packages/turfpy/measurement.py", line 112, in distance
#     coordinates1 = get_coord(point1)
#   File "/usr/local/miniconda3/lib/python3.9/site-packages/turfpy/helper.py", line 80, in get_coord
#     raise Exception("coord must be GeoJSON Point or an Array of numbers")
# Exception: coord must be GeoJSON Point or an Array of numbers

I'd rather derive my Vertex class from Feature rather than "compose" by adding a feature attribute to my Vertex class.
Thanks in advance for your help.
P.

@devleaks Thanks for reporting this. We will have to fix this. as type checking is not done correctly.


Migrate to dropbox api v2

This closes #8303.
Disclaimers:

In this PR, when we mention that "there's an error with the sync", "the sync is broken" and so on we mean that "the table is no longer synchronized with the file".
There is no scenario where any table should be deleted or any map should be broken because of this.

For acceptance, this PR shouldn't only work but also be backwards compatible, so I'll write down the full path for the migration.
During the process we'll create 3 syncs:

S1 will be used to check that it will be broken and then recovered.
S2 will be used to check that, without breaking in the middle, we can sync across the migration.
S3 will be used to check internals.

Acceptance

Deploy master, and check Dropbox configuration. It should point to a Dropbox app with "Documents" permission (the old one).
Connect to Dropbox. You should get a warning message about old version being retired.
Disconnect from Dropbox.
Connect to Dropbox. Steps 3 and 4 are just a validation that you're not having issues disconnecting.
Import a file without sync (let's call it "F" file). Create a map ("FM") on it.
Import a file with sync ("S1") and create a map ("S1M") on it.
Change the S1 sync file and force sync (you can manipulate synchronizations.ran_at at to avoid waiting). Everything's ok.
Import another file with sync ("S2"), with a day interval (we don't want this to be triggered automatically yet). Create a map ("S2M") with it.
Import another file with sync ("S3"), with a day interval (we don't want this to be triggered automatically yet). Create a map ("S3M") with it.

Until now, you've validated that current integration works for you, and you've set up a scenario to validate that migration will work.
Then...

wipe permissions. SynchronizationOauth.where(service: 'dropbox').each(&:destroy) TODO: script

Trigger S3 sync at Rails console (CartoDB::Synchronization::Member.new(id: '8e5cebae-36f1-11e7-b3d5-784f436d1355').fetch.run). It will fail (CartoDB::Datasources::DropboxPermissionError: No Dropbox client @ dropbox). Check the error at Rollbar and write it down. That's an expected error during the migration, between the steps of permission wiping and configuration changing.

change the Dropbox configuration to use a new one that has "Full" permission (because "Documents" one is no longer supported).
deploy this branch

Change the S1 sync file and force sync. It should fail, because credentials are not ok. Table and S1M should still be there.

TODO: what happens if I try importing Dropbox at this point?

Go to your account. You should appear as disconnected from Dropbox.
Trigger S3 sync. It will fail. That's an expected error (you have revoked your Dropbox credentials).
Go to your account. Connect Dropbox again.
Go to S1 dataset. It should display an error. Force the sync. It should work and the error should be gone. S1M should be updated.
Change S2 file again and force the sync. It should work. S2M should be updated.
Import a file without sync.
Disconnect Dropbox.

At this point, you've validated that the migration itself works ok. Now, the last step is checking that it works for new users:

Import a Dropbox file without sync. You should be prompted for permission.
Import with sync.
Change the sync file and force sync.
Disconnect from Dropbox.

Downtime check:

deploy master again, but keep the new configuration.
Try connecting again and importing a file.

If that works, it means that we can use the new configuration with the old code (v1 endpoints), so we won't have downtime.
Additional acceptance:

This changes a small detail on sync flow (it resets error message and code when a sync is enqueued), so sync state transitions (ok -> ok, ok -> fail, fail -> ok, fail -> fail) should be tested as well.

I think that I answered everything, let me know if there's something missing before acceptance.

I think you got everything, moving forward.

Gentle reminder: this should not be merged yet.

Acceptance looks good. I am missing the downtime check (waiting for master deploy, tomorrow).
The only thing is that revoking from CARTO does not remove the app from Dropbox "connected apps" section, in neither v1 nor v2. This is ok, and likely how it's supposed to work, but worth mentioning.
Great job on getting this upgrade to work and on those testing instructions 👏.

Finished acceptance and everything looks good. I found a logistical issue (in the other ticket) https://github.com/CartoDB/cartodb-management/issues/4936#issuecomment-302010506

@javitonino 👀


Event not received in the Subscribe method

Hi all,
First time using Otto and having some trouble getting the event to arrive at the method subscribed to it.
In Activity1, I  have the line:
BusProvider.getInstance().post(mGameState);
At Activit2, I have the line:
@Subscribe
public void do(MultiplayerGameState mTurnData) {
}
Obviously I am sending the same object type in the post... nothing arrived at the do() method.
Is there anything else in terms of configuration I have to do? Something in XMLs?
I have also registered the Bus in the onStart method. Have also tried in the onResume method.
Nothing worked.

Check if you are using the correct "Subscribe" (Don't accidentally use Google's EventBus).

Is the second activity registered before the first one sends the event?

Thanks Jake and Luaz.
I can confirm that the interface used to subscribe is com.squareup.otto.Subscribe
I confirm that register() is called in onStart() in both Activities and unregister it onStop()
The Activity2, the one that posts() is registered after Activity1.
Basically, Activity1 calls Activity2 and then Activity2 sends a message to Activity1.
That's a correct pattern, right?

ok, I just tried removing the unregister() call from both Activities and now I got the event...
is it maybe because when Activity1 calls Activity2 via Intent, the onStop() method is called and therefore unregistering the bus?

Probably, yes. Otto is not designed for communicating between activities. Since only one is displayed on the screen at a time, it's unsurprising that events get lost when each is registering and unregistering as their visibility status changes. You're much better off using the Intent system and activity result system for passing data as part of navigation flow. An event bus is for distribution of information and it should be assumed that events could always be missed.

Dang, I completely thought that Otto was meant for communication between activities! Dang, that would've been really nice :)
Thanks for the info Jake.
I suppose EventBus from GreenRobot also does not this sort of job?

Just tried EventBus with RegisterSticky. It is pretty much working the same way as Otto. I cannot unregister Activity1, it needs to always listen
Now the problem is that I have a GoogleApiClient class and the method that gets called from Activity2 needs it to be connected.
Since that event is by-passing the onStart() of Activity1 (where mGoogleApiClient.connect() ) is, the object is not connect. And then I fail. Probably a second later, the onStart() is called and it gets connected.
I will have to think of a different architecture.


Update junit-interface to 0.13.2

Updates com.novocode:junit-interface from 0.11 to 0.13.2.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.novocode", artifactId = "junit-interface" } ]

labels: test-library-update

Superseded by #241.


Can't get examples working

Can't get this working.
First I tried latest stable version from ubuntu ppa, 0.6.x
Then I updated neovim from unstable ppa to 0.8.0-dev and non of examples working, but giving a bit different output.
:lua require("neotest").run.run(vim.fn.expand("%"))

E5108: Error executing lua [string ":lua"]:1: attempt to index field 'run' (a nil value)
stack traceback:
        [string ":lua"]:1: in main chunk
Press ENTER or type command to continue

You need to have at least 0.7 so 0.6 won't work.
I'm not sure why you're getting this issue, can you use the following minimal init.lua to reproduce?
nvim --clean -u minimal.lua

-- ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.expand("~/.config/nvim"))
vim.opt.packpath:remove(vim.fn.expand("~/.local/share/nvim/site"))

-- append test directory
local test_dir = "/tmp/nvim-config"
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))

-- install packer
local install_path = test_dir .. "/pack/packer/start/packer.nvim"
local install_plugins = false

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
  vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
  vim.cmd("packadd packer.nvim")
  install_plugins = true
end

local packer = require("packer")

packer.init({
  package_root = test_dir .. "/pack",
  compile_path = test_dir .. "/plugin/packer_compiled.lua",
})

packer.startup(function(use)
  -- Packer can manage itself
  use("wbthomason/packer.nvim")

  use("vim-test/vim-test")
  use({
    "nvim-neotest/neotest",
    requires = {
      "nvim-lua/plenary.nvim",
      "nvim-treesitter/nvim-treesitter",
      "antoinemadec/FixCursorHold.nvim",
      "nvim-neotest/neotest-vim-test",
      "nvim-neotest/neotest-python",
    },
    config = function()
      require("neotest").setup({
        adapters = {
          require("neotest-vim-test"),
          require("neotest-python"),
        },
      })
    end,
  })

  if install_plugins then
    packer.sync()
  end
end)

Hi @rcarriga,
Thank you for the quick reply!

You need to have at least 0.7 so 0.6 won't work.
I'm not sure why you're getting this issue, can you use the following minimal init.lua to reproduce?

I tried the minimal.lua it and there are no lua related errors if I execute:
:lua require("neotest").run.run(vim.fn.expand("%"))

However I see red crosses near the Go tests while tests are actually passing.

In a clean setup that you suggested there's neotest-vim-test
In my original setup it was neotest-go (but It's not working because of these lua errors)

OK for neotest-vim-test can you see the error in the output? Also can you add neotest-go and test with that?

With neotest-go plugged in I can reproduce the initial problem I had:
E5108: Error executing lua [string ":lua"]:1: attempt to index field 'run' (a nil value)
stack traceback:
        [string ":lua"]:1: in main chunk

When running
:lua require("neotest").run.run(vim.fn.expand("%")) and
:lua require("neotest").run(vim.fn.expand("%"))

The first one is correct, the second is not. I can't seem to reproduce with neotest-go. Do you have a repo I can try on?

@rcarriga do you mean a go repo with test or a repo with nvim configs?
I spent some time carefully looking at my config and managed to get a different error (doesn't seem related to neotest itself):
E5108: Error executing lua ...m/dein/.cache/init.vim/.dein/lua/plenary/async/async.lua:14: The coroutine failed with this message: Vim:E117: Unknown function: test#test_file

stack traceback:
        [C]: in function 'error'
        ...m/dein/.cache/init.vim/.dein/lua/plenary/async/async.lua:14: in function 'callback_or_next'
        ...m/dein/.cache/init.vim/.dein/lua/plenary/async/async.lua:40: in function 'step'
        ...m/dein/.cache/init.vim/.dein/lua/plenary/async/async.lua:43: in function 'execute'
        ...m/dein/.cache/init.vim/.dein/lua/plenary/async/async.lua:103: in function 'run'
        ...dein/.cache/init.vim/.dein/lua/neotest/consumers/run.lua:30: in function 'run'
        [string ":lua"]:1: in main chunk

This happens when I run:
:lua require("neotest").run.run(vim.fn.expand("%"))
Here are two major pieces of my init.vim:
" neotest requirements
call dein#add("nvim-lua/plenary.nvim")
call dein#add("nvim-treesitter/nvim-treesitter")
call dein#add("antoinemadec/FixCursorHold.nvim")
call dein#add("nvim-neotest/neotest")
call dein#add("nvim-neotest/neotest-vim-test")
call dein#add("nvim-neotest/neotest-go")
call dein#add("nvim-neotest/neotest-plenary")
" end neotest requirements

lua <<EOF
require("neotest").setup({
  adapters = {
    require("neotest-plenary"),
    require("neotest-vim-test")({
      ignore_file_types = { "python", "vim", "lua" },
    }),
    require("neotest-go"),
  },
})
EOF

I guess I have latest versions of all plugins because I just updated them with: dein#update()

E5108: Error executing lua ...m/dein/.cache/init.vim/.dein/lua/plenary/async/async.lua:14: The coroutine failed with this message: Vim:E117: Unknown function: test#test_file

You don't have vim-test installed which is causing the issue. Also add go to the ignored file types for neotest-vim-test to prevent it being used.

E5108: Error executing lua ...m/dein/.cache/init.vim/.dein/lua/plenary/async/async.lua:14: The coroutine failed with this message: Vim:E117: Unknown function: test#test_file

You don't have vim-test installed which is causing the issue. Also add go to the ignored file types for neotest-vim-test to prevent it being used.

This indeed eliminated all errors I had but now when I run: :lua require("neotest").run.run(vim.fn.expand("%")) nothing happens.
When I run :lua require("neotest").run.run() while the test file is open and a cursor pointing to the very beginning of the file I see "No tests found" message in a status line. The file clearly contains some tests and these tests are passing when being called via go test ./... from the concole.
Here is the example of the name of the test func:
func TestRule_Compile(t *testing.T) {
When I run :lua require("neotest").output.open() I see a bit different message in a status line saying the same thing:
"No tests found in file"

OK this now sounds like a neotest-go issue. Could you provide the contents of the log file? It's in stdpath("log") or stdpath("cache")

@rcarriga here is the piece of log:
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener diagnostic for event discover_positions
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener summary for event discover_positions
ERROR | 2022-06-17T11:44:56Z+0400 | ...m/dein/.cache/init.vim/.dein/lua/neotest/client/init.lua:415 | Couldn't find positions in path /home/max/dev/github.com/project/path>
ERROR | 2022-06-17T11:44:56Z+0400 | ...m/dein/.cache/init.vim/.dein/lua/neotest/client/init.lua:415 | Couldn't find positions in path /home/max/dev/github.com/project/path>
ERROR | 2022-06-17T11:44:56Z+0400 | ...m/dein/.cache/init.vim/.dein/lua/neotest/client/init.lua:415 | Couldn't find positions in path /home/max/dev/github.com/project/path>
ERROR | 2022-06-17T11:44:56Z+0400 | ...m/dein/.cache/init.vim/.dein/lua/neotest/client/init.lua:415 | Couldn't find positions in path /home/max/dev/github.com/project/path>
DEBUG | 2022-06-17T11:44:56Z+0400 | ...dein/.cache/init.vim/.dein/lua/neotest/lib/file/find.lua:46 | Searching for files using command  { "find", "/home/max/dev/github.com/>
DEBUG | 2022-06-17T11:44:56Z+0400 | ...dein/.cache/init.vim/.dein/lua/neotest/lib/file/find.lua:72 | Searching for files finished
DEBUG | 2022-06-17T11:44:56Z+0400 | .../.cache/init.vim/.dein/lua/neotest/client/state/init.lua:54 | New positions at ID /home/max/dev/github.com/project/pathe-staki>
INFO | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:46 | Emitting discover_positions event
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener status for event discover_positions
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener diagnostic for event discover_positions
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener summary for event discover_positions
ERROR | 2022-06-17T11:44:56Z+0400 | ...m/dein/.cache/init.vim/.dein/lua/neotest/client/init.lua:415 | Couldn't find positions in path /home/max/dev/github.com/project/path>
INFO | 2022-06-17T11:44:56Z+0400 | ...m/dein/.cache/init.vim/.dein/lua/neotest/client/init.lua:572 | Initialisation finished in 0 seconds
INFO | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:46 | Emitting test_file_focused event
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener status for event test_file_focused
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener diagnostic for event test_file_focused
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener summary for event test_file_focused
DEBUG | 2022-06-17T11:44:56Z+0400 | .../.cache/init.vim/.dein/lua/neotest/client/state/init.lua:78 | Setting positions to running /home/max/dev/github.com/project/path>
INFO | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:46 | Emitting run event
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener status for event run
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener diagnostic for event run
DEBUG | 2022-06-17T11:44:56Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener summary for event run
INFO | 2022-06-17T11:44:56Z+0400 | ...he/init.vim/.dein/lua/neotest/client/strategies/init.lua:30 | Starting process neotest-go-/home/max/dev/github.com/project/path>
DEBUG | 2022-06-17T11:44:56Z+0400 | ...he/init.vim/.dein/lua/neotest/client/strategies/init.lua:31 | Strategy spec {
  command = "go test -v -json /project/path/matcher/matcher_test.go",
  context = {
    file = "/project/path/matcher/matcher_test.go",
    results_path = "/tmp/nvimafHvc5/2"
  },
  strategy = {
    height = 40,
    width = 120
  }
}
INFO | 2022-06-17T11:44:57Z+0400 | ...he/init.vim/.dein/lua/neotest/client/strategies/init.lua:35 | Process for position neotest-go-/home/max/dev/github.com/project/path>
DEBUG | 2022-06-17T11:44:57Z+0400 | ...he/init.vim/.dein/lua/neotest/client/strategies/init.lua:37 | Output of process  /tmp/nvimafHvc5/3
ERROR | 2022-06-17T11:44:57Z+0400 | .../nvim/dein/.cache/init.vim/.dein/lua/neotest-go/init.lua:85 | Failed to parse test output:
Expected value but found invalid token at character 1
table: 0x4129b020 /tmp/nvimafHvc5/3
DEBUG | 2022-06-17T11:44:57Z+0400 | .../.cache/init.vim/.dein/lua/neotest/client/state/init.lua:65 | New results for adapter neotest-go
INFO | 2022-06-17T11:44:57Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:46 | Emitting results event
DEBUG | 2022-06-17T11:44:57Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener status for event results
DEBUG | 2022-06-17T11:44:57Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener diagnostic for event results
DEBUG | 2022-06-17T11:44:57Z+0400 | ...ache/init.vim/.dein/lua/neotest/consumers/diagnostic.lua:57 | Setting diagnostics for /home/max/dev/github.com/project/pathe-s>
DEBUG | 2022-06-17T11:44:57Z+0400 | ....cache/init.vim/.dein/lua/neotest/client/events/init.lua:48 | Calling listener output for event results

ERROR | 2022-06-17T11:44:56Z+0400 | ...m/dein/.cache/init.vim/.dein/lua/neotest/client/init.lua:415 | Couldn't find positions in path /home/max/dev/github.com/project/path>

It looks like the lines are cut off. Can you share the full file please. You can delete and rerun with dummy repo if it has sensitive info in it

It seem's like I had to run:
:TSInstall go first

Now it seems like neotest is able to find tests in the file and the :lua require("neotest").output.open() works but shows nothing:
    1 package matcher
    2
    3 import (
    4   "testing"
    5
    6   "github.com/stretchr/testify/assert"
    7   "github.com/stretchr/testify/require"
    8 )
    9
ﰸ  10 func TestRule_Compile(t *testing.T) {
   11   tests := []struct╭────────────────────────────────────────────────────────────────────────────────╮
   12     name    string │                                                                                │
   13     init    func(t │                                                                                │
   14     inspect func(r │                                                                                │
   15                    │                                                                                │
   16     env interface{}│                                                                                │
   17                    ╰────────────────────────────────────────────────────────────────────────────────╯
   18     wantErr    bool
   19     inspectErr func(err error, t *testing.T)

Ok, It seems like it works after restart:
    1 package matcher
    2
    3 import (
    4   "testing"
    5
    6   "github.com/stretchr/testify/assert"
    7   "github.com/stretchr/testify/require"
    8 )
    9
✖  10 func TestRule_Compile(t *testing.T) {
   11   tests := []struct ╭────────────────────────────────────────────────────────────────────────────────╮
   12     name    string  │=== RUN   TestRule_Compile                                                      │
   13     init    func(t *│=== RUN   TestRule_Compile/error                                                │
   14     inspect func(r *│    matcher_test.go:62:                                                         │
   15                     │        Error Trace:matcher_test.go:62                                          │
   16     env interface{} │        Error:      Received unexpected error:                                  │
   17                     │                    unexpected token Operator("=") (1:5)                        │
   18     wantErr    bool │                     | a.b = b.c                                                │
   19     inspectErr func(│                     | ....^                                                    │
   20   }{                │                    expr.Compile("a.b = b.c")                                   │
   21     {               │        Test:       TestRule_Compile/error                                      │
   22       name: "error",│=== RUN   TestRule_Compile/success                                              │
   23       init: func(t *│--- FAIL: TestRule_Compile (0.00s)                                              │
   24         return &Rule│    --- FAIL: TestRule_Compile/error (0.00s)                                    │
   25           Name:     │    --- PASS: TestRule_Compile/success (0.00s)                                  │
   26           Expression│                                                                                │
   27         }           ╰────────────────────────────────────────────────────────────────────────────────╯
   28       },
   29       wantErr: false,
   30     },

Ok I think I have the last problem:
:lua require("neotest").run.run(vim.fn.expand("%")) doesn't seem to work. When I run it it does nothing but
:lua require("neotest").run.run() works as expected

I'm going to ask you to move these issues to neotest-go because I'm afraid I have no idea why that would not work and I didn't write neotest-go.

@rcarriga Ok, no problem, thanks for you help.

Going to close this as I believe there are no issues in the core repo to address


Load assembly from project.assets.json file alone

I am writing a tool that operates on a target project and needs to load one of the project dependencies even before the project is built. Let say we have ProjectA that depends either on DllX or DllY (usually not both): my tool scans ProjectA.csproj and determines the dependencies then need to load and use the correct dll. Right now the tool knows its own location into the NuGet cache and tries to load the dll from there but this is a bit fragile (for example, project references won't work).
I'd like to be able to tell DotNetCorePlugins "please, use the project.assets.json from that obj directory (after a restore) and load me the assembly named DllX".
A different approach is to build the target project then use DotNetCorePlugins to load the main assembly and eventually load the correct dll but this is a kind of chicken-and-egg problem because the project may depend on the code generated by my tool to build.

Sorry for the late response.

I'd accept a well written PR to add this functionality as a new package, something like McMaster.NETCore.Plugins.ProjectLoader. Implementing this won't be trivial, and I'm probably not going to implement this one for you since I don't think this is a common scenario. That said, I'm happy to help review code and provide some advice on how to do it.

Fair enough. And I agree that this isn't a common scenario. I am currently trying an alternative approach that uses DotNetCorePlugins as is, but if it doesn't work I'll surely go back and try to implement what you're describing above.
In the meantime, thank you very much for this library.


A way to port this library to js

Hi, I'm looking for a way to run it in js scope, Is there a way to port haskell to js?

We could experiment with using GHCJS, but this might end up being a rather large project. Can you explain a little bit about your use case?

I'm closing this issue due to lack interest.


[Feature Request]: enable login without DOCKER_ENABLE_SECURITY=true/false!!!

Feature Description
The current configuration parameter DOCKER_ENABLE_SECURITY=true/false in Docker environments presents significant operational challenges, especially in production scenarios. This setting inhibits critical functionalities necessary for robust deployment and management of services. Below are the key issues encountered:

Zero-Configuration High Availability:
Setting DOCKER_ENABLE_SECURITY=true/false prevents achieving zero-configuration high availability. When containers restart unexpectedly, they must re-download dependencies, causing delays in service availability. Moreover, failed downloads could render services permanently unavailable.

Geographical Network Constraints:
GitHub's accessibility and the ability to download internal plugins are hindered by regional network issues. Not all regions can seamlessly access GitHub or reliably download required dependencies during runtime.
In cloud function environments, which involve cold start mechanisms and startup timeout constraints:
Cold starts and startup timeouts in cloud functions can exacerbate the impact of geographical network constraints. Dependencies that cannot be pre-cached or efficiently retrieved due to network issues may lead to increased latency or even service failures during function invocation.

Kubernetes (K8s) Multi-instance Redundancy:
In Kubernetes environments with multiple instances, each instance independently downloads dependencies, leading to redundant downloads and potential inefficiencies.

These limitations significantly impact operational efficiency and service reliability, necessitating a reconsideration of the current configuration approach.
Why is this feature valuable?
No response
Suggested Implementation

Docker Integration Approach:

Objective: Ensure reliable deployment without relying on dynamic plugin downloads at runtime.
Proposed Solution: Integrate necessary dependencies internally within Docker during image build or deployment phase. Avoid runtime dependencies that hinder availability and reliability.

Flexibility and Integration Approach:

Objective: Enhance flexibility by supporting external authentication services via configurable endpoints.
Proposed Solution:

Remote URL Configuration: Introduce REMOTE_LOGIN_URL in application settings to specify a remote endpoint for login validation. Applications can securely POST user-provided credentials to REMOTE_LOGIN_URL for validation, facilitating centralized authentication and audit log management.
Standardized Communication: Define a JSON request format (e.g., { "username": "example", "password": "*****" }) for secure transmission of credentials. Clearly define expected JSON response structures to handle authentication success or failure, ensuring consistent handling across authentication endpoints.

Additional Context
This approach caters to diverse deployment scenarios, including cloud-based, hybrid, and on-premises environments, facilitating seamless integration with various identity providers.
Additional Information
PLS: Consider the difficulties of intranet/offline environment deployment.
No Duplicate of the Feature

[X] I have verified that there are no existing feature requests similar to my request.

Our fat docker contains the security jar and does not download it at runtime
You should be good using that


Add main property to package.json

Add main property to package.json so library can be used with require/import.
https://docs.npmjs.com/files/package.json#main

Should this maybe reference the un-minifed (src) file instead?
Use case: using browserify with NPM to bundle all scripts to a file and using a custom minifier for the bundle.

Yes, this is a good idea. Referring to source files can be a problem if the library is written in ES6 syntax (because people tend to ignore files under node_modules in webpack config) but this is not the case with this library.


Get the current project directory when running tests using integration_test package

On running tests using the integration_test package the current directory is set as '/'.
Folder Structure

test_driver/integration_test.dart
integration_test/foo_test.dart

//integration_test.dart
import 'dart:io';
import 'package:integration_test/integration_test_driver.dart';
Future main() {
print(' Inside test driver ${Directory.current}');
integrationDriver();
}
//foo_test.dart
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets("failing test example", (WidgetTester tester) async {
print('Inside integration test: ${Directory.current}');
});
}
Run Command: flutter drive --driver=test_driver/integration_test.dart --target=integration_test/foo_test.dart
output:
Running "flutter pub get" in shop_app...                           665ms
Running Gradle task 'assembleDebug'...                             15.3s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...              2,758ms
Inside test driver Directory: '/Users/XXX/Desktop/projects/shop_app'
VMServiceFlutterDriver: Connecting to Flutter application at http://<IP_ADDRESS>:49682/4vZgK6h-8YI=/
VMServiceFlutterDriver: Isolate found with number:<PHONE_NUMBER>881207
VMServiceFlutterDriver: Isolate is paused at start.
VMServiceFlutterDriver: Attempting to resume isolate
D/EGL_emulation( 2945): eglMakeCurrent: 0xe7afc800: ver 3 0 (tinfo 0xe7aa71a0)
D/eglCodecCommon( 2945): setVertexArrayObject: set vao to 0 (0) 1 0
I/flutter ( 2945): 00:00 +0: failing test example
VMServiceFlutterDriver: Connected to Flutter application.
I/flutter ( 2945): Inside integration test: Directory: '/'
I/flutter ( 2945): 00:00 +1: (tearDownAll)
All tests passed.
I/flutter ( 2945): 00:00 +2: All tests passed!
Run Command: flutter test integration_test/foo_test.dart
output:
00:00 +0: loading /Users/XXX/Desktop/projects/shop_app/integration_test/foo_test.dart                                                                                R00:15 +0: loading /Users/XXX/Desktop/projects/shop_app/integration_test/foo_test.dart                                                                                15.4s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
00:16 +0: loading /Users/XXX/Desktop/projects/shop_app/integration_test/foo_test.dart                                                                                I00:19 +0: loading /Users/XXX/Desktop/projects/shop_app/integration_test/foo_test.dart                                                                                3.6s
00:22 +0: failing test example
Inside integration test: Directory: '/'
00:23 +1: All tests passed!
Expected Results : print(Directory.current) should print the flutter project directory.
Actual results: : It points to root folder of the machine
flutter doctor -v
[✓] Flutter (Channel master, 2.3.0-17.0.pre.236, on macOS 11.4 20F71 darwin-x64, locale en-CA)
• Flutter version 2.3.0-17.0.pre.236 at /Users/malika/flutterSDK/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3858cc655c (3 days ago), 2021-06-07 15:34:04 -0400
• Engine revision 613d0a19fc
• Dart version 2.14.0 (build 2.14.0-187.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/malika/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Users/malika/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 57.0.5
• Dart plugin version 211.7233
[✓] VS Code (version 1.56.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.23.0
[✓] VS Code (version 1.41.1)
• VS Code at /Users/malika/Downloads/Visual Studio Code.app/Contents
• Flutter extension version 3.23.0
[✓] Connected device (2 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
• Chrome (web)                 • chrome        • web-javascript • Google Chrome 91.0.4472.77

Your integration test is running on the device, not the host machine. Is this a problem? You can run host side tests with regular flutter test, or run a test script on the host side with flutter driver.
I'm not sure what you are looking for here.

Thank you @jonahwilliams  for quickly looking into the issue.
The reason I asked because we have some test data (source data & expect data json files) that are used when the tests are running. Additionally, we have our own custom reporting for integration tests that records the passed/failed tests in a file present in the integration_test directory. Every time we try to open these files when the tests are running we get "file not found" error.
We found a workaround for iOS simulators by temporarily copying the required files at "/Applications" folder of the host machine and then removing them. But this does not work for android emulators, i believe for the same reason that you mentioned, they can not access the machine's storage.
I understand "running on the target device" is the main highlight for integration_package but would you be able to suggest some ideal approach for this.

If you want to access them on the device, you could try bundling them as an asset

By bundling it as an asset you mean inside the main application's asset folder? If yes, then we would be a bit hesitant to put our test data there.

I think this needs to be a question on stack overflow or a community chat. I understand you're looking for help writing your test but from my perspective everything is working as intended and you'll need to come up with a solution on your own. Me suggesting things one at a time is not going to be effective since I don't know your constraints.


How do we control "recording" from calling Server API instead of using SDK ?

We use Python as our core back-end and do not actually want to over-engineer with NPM/GO. Most of the things will work during Client/Server co-operation, but recording.
The question is how do we control "recoding" from calling LiveKit Server HTTP-API instead of using SDK?
Thanks,
Steve

You'll need to use protoc to generate a python binding for https://github.com/livekit/protocol/blob/main/livekit_recording.proto, and then implement something similar to https://github.com/livekit/server-sdk-js/blob/main/src/RecordingServiceClient.ts or https://github.com/livekit/server-sdk-go/blob/main/recordingclient.go but in python

You'll need to use protoc to generate a python binding for https://github.com/livekit/protocol/blob/main/livekit_recording.proto, and then implement something similar to https://github.com/livekit/server-sdk-js/blob/main/src/RecordingServiceClient.ts or https://github.com/livekit/server-sdk-go/blob/main/recordingclient.go but in python

How wonderful :) Thank you.

Twirp services are also just HTTP.. so you could just post JSON payloads to it.


Save as Excel on Windows doesn't open Excel

SQL Operations Studio Version:
OS: Windows

Steps to Reproduce:
Run a query & click Save as Excel button. Fill in path and click OK
Expected:

Excel appears with the file opened
Actual:
Excel never opens

This may be machine-specific, but warrants investigation. We use a VSCode API to open files natively and this works for browser paths, but perhaps in this case we need to prompt with more info so excel files open as expected?

There is a now an Open File button in the save completed notification window that will launch Excel.


[Draft] Attempt to load OneDrive accounts from the Windows Registry

In relation to #3095
Locally I see the SecurityException raised when attempting to open the registry key, however I believe this may be a local issue for me as @gave92 confirmed the code works okay for him (https://github.com/files-community/Files/issues/3095#issuecomment-761670885)
I am opening this PR to see if the resulting build artifact does indeed work for myself and anyone else who would like to test it.
If it does work, you should see "OneDrive - Personal" in the sidebar, plus additional entries for any business/education/government OneDrive accounts you have as "OneDrive - TENANT NAME".

@gave92, thanks for the feedback.
I am still unsure how it seems to work for you but locally I get the security exception. From what I know, UWP apps can't read from most parts of the registry unless they use an app service connection to a non-UWP app (such as Files.Launcher). I can read HKEY_CLASSES_ROOT, and HKEY_CURRENT_USER at the top level and \Environment keys, but nothing below HKCU\Software\Microsoft.
If anyone else can confirm if this works, it might point to an issue with my registry, or possibly I am doing something wrong when launching from VS.
#3099 has been updated to address the personal OneDrive account bug so it is ready for further testing.
In the meantime I have gone down the route of using Files.Launcher to read the registry keys and I have an working sample. Well I say working.... it works perfectly if debugging and stepping through code. But if launched without any breakpoints, the main UI appears but no OneDrive entries show up. From a lot of testing, I believe setting up the AppService connection has some initial delay, or a timing issue when not using the AppService connection from a UI component. Adding an artificial delay to simulate stepping through code between opening the connection and sending a message over the connection demonstrates it works.
I am not sure if this could be related to the main UI itself establishing a connection and my extra connection from OneDriveCloudProvider interferring; but I see no easy way to obtain a connection other than constructing my own. I have considered that it might be beneficial to have a single class responsible for maintaining and establishing an app-wide AppServiceConnection, but that may be a bad direction and require quite a bit of a rewrite.
If have this alternative method on a branch in case you'd like to see it: https://github.com/AndyMDoyle/Files/commit/29fe6329afbaf161be7a5c0777178aab1c56ee3d

@gave92, thanks for the feedback.
I am still unsure how it seems to work for you but locally I get the security exception. From what I know, UWP apps can't read from most parts of the registry unless they use an app service connection to a non-UWP app (such as Files.Launcher). I can read HKEY_CLASSES_ROOT, and HKEY_CURRENT_USER at the top level and \Environment keys, but nothing below HKCU\Software\Microsoft.
If anyone else can confirm if this works, it might point to an issue with my registry, or possibly I am doing something wrong when launching from VS.
#3099 has been updated to address the personal OneDrive account bug so it is ready for further testing.
In the meantime I have gone down the route of using Files.Launcher to read the registry keys and I have an working sample. Well I say working.... it works perfectly if debugging and stepping through code. But if launched without any breakpoints, the main UI appears but no OneDrive entries show up. From a lot of testing, I believe setting up the AppService connection has some initial delay, or a timing issue when not using the AppService connection from a UI component. Adding an artificial delay to simulate stepping through code between opening the connection and sending a message over the connection demonstrates it works.
I am not sure if this could be related to the main UI itself establishing a connection and my extra connection from OneDriveCloudProvider interferring; but I see no easy way to obtain a connection other than constructing my own. I have considered that it might be beneficial to have a single class responsible for maintaining and establishing an app-wide AppServiceConnection, but that may be a bad direction and require quite a bit of a rewrite.
If have this alternative method on a branch in case you'd like to see it: https://github.com/AndyMDoyle/Files/commit/29fe6329afbaf161be7a5c0777178aab1c56ee3d

@AndyMDoyle thanks I've just tested your latest changes and Onedrive - Personal happily shows on the sidebar in Release mode as well. @yaichenbaum, @tsvietOK could you test the azure build of this PR and see if it works for you?
If the fulltrust process method gets too complicated you could also take a look at reading the onedrive path from the .ini files here %localappdata%\Microsoft\OneDrive\settings\Personal. This should be free of permission and timing issues

@AndyMDoyle thanks I've just tested your latest changes and Onedrive - Personal happily shows on the sidebar in Release mode as well. @yaichenbaum, @tsvietOK could you test the azure build of this PR and see if it works for you?
If the fulltrust process method gets too complicated you could also take a look at reading the onedrive path from the .ini files here %localappdata%\Microsoft\OneDrive\settings\Personal. This should be free of permission and timing issues

Will this pull request help for displaying multiple OneDrive accounts or is it just an improvement over the current code?

Will this pull request help for displaying multiple OneDrive accounts or is it just an improvement over the current code?

@gave92 Is just tested this PR in debug and OneDrive isn't coming up on the sidebar.

@gave92 Is just tested this PR in debug and OneDrive isn't coming up on the sidebar.

@yaichenbaum Thanks, I guess I'm the lucky one then

@yaichenbaum Thanks, I guess I'm the lucky one then

@yaichenbaum, this method of using the registry to load the list of configured OneDrive accounts will result in any configured OneDrive accounts being listed exactly as Explorer displays them.
Sadly it seems the UWP sandbox is a problem if it doesn't work for you either.
Using Files.Launcher (as with my branch above) is one workaround. I have had a look at the ini files on disk and there doesn't appear to be consistency between the file naming or file structure. Each account has files with a random filename, and the contents vary so pinpointing the path is going to be a string parsing nightmare.
I am going to try and improve the Files.Launcher situation regarding the delay when I have a little more time, unless anyone has any other ideas?

@yaichenbaum, this method of using the registry to load the list of configured OneDrive accounts will result in any configured OneDrive accounts being listed exactly as Explorer displays them.
Sadly it seems the UWP sandbox is a problem if it doesn't work for you either.
Using Files.Launcher (as with my branch above) is one workaround. I have had a look at the ini files on disk and there doesn't appear to be consistency between the file naming or file structure. Each account has files with a random filename, and the contents vary so pinpointing the path is going to be a string parsing nightmare.
I am going to try and improve the Files.Launcher situation regarding the delay when I have a little more time, unless anyone has any other ideas?

The ini should have a line like this library = 1 4 AD184A76A70E8923!122<PHONE_NUMBER> "SkyDrive" Me personal "D:\Users\Marco\OneDrive" . Is it different for you / business?
When I've time I'll take a look at your branch and see if anything comes to mind.

The ini should have a line like this library = 1 4 AD184A76A70E8923!122<PHONE_NUMBER> "SkyDrive" Me personal "D:\Users\Marco\OneDrive" . Is it different for you / business?
When I've time I'll take a look at your branch and see if anything comes to mind.

For business accounts the only line containing the path is this:
libraryScope = 0 c1c456ef4XXXXXXXXXXXXXXXX7c1 5 "MySite" "ODB" 2 "https://TENANT-my.sharepoint.com/personal/andy_doyle_DOMAIN" "b2dfXXXX-XXXX-XXXX-XXXX-XXXXXXXXb21e" 6fd6XXXXXXXXXXXXXXXXXXXXXXXf28b 513fXXXXXXXXXXXXXXXXXXXXXXXb0e0 f2b4XXXXXXXXXXXXXXXXXXXXXXX399f 161XXXXXX24 "C:\Users\andydoyle\OneDrive - COMPANY NAME" 1 ad50XXXX-XXXX-XXXX-XXXX-XXXXXXXX2f31  -
It feels a little dirty relying on this when Microsoft could break it at any moment simply by slightly changing one line in a text file.

For business accounts the only line containing the path is this:
libraryScope = 0 c1c456ef4XXXXXXXXXXXXXXXX7c1 5 "MySite" "ODB" 2 "https://TENANT-my.sharepoint.com/personal/andy_doyle_DOMAIN" "b2dfXXXX-XXXX-XXXX-XXXX-XXXXXXXXb21e" 6fd6XXXXXXXXXXXXXXXXXXXXXXXf28b 513fXXXXXXXXXXXXXXXXXXXXXXXb0e0 f2b4XXXXXXXXXXXXXXXXXXXXXXX399f 161XXXXXX24 "C:\Users\andydoyle\OneDrive - COMPANY NAME" 1 ad50XXXX-XXXX-XXXX-XXXX-XXXXXXXX2f31  -
It feels a little dirty relying on this when Microsoft could break it at any moment simply by slightly changing one line in a text file.

@AndyMDoyle well they could change the registry too I guess.. but I hoped the ini file would have been a bit more uniform

@AndyMDoyle well they could change the registry too I guess.. but I hoped the ini file would have been a bit more uniform

I'm going to propose a middle ground to give the enhancement without reduced risk of OneDrive not appearing at all.
I can update the OneDriveCloudProvider by enhancing it by parsing the INI file. We do both methods of using the environment settings, but attempt to add additional accounts by parsing the INI files. This way if there is a problem loading or parsing the files, users will still see their personal and first business account in the UI.
Does that sound worthwhile?

I'm going to propose a middle ground to give the enhancement without reduced risk of OneDrive not appearing at all.
I can update the OneDriveCloudProvider by enhancing it by parsing the INI file. We do both methods of using the environment settings, but attempt to add additional accounts by parsing the INI files. This way if there is a problem loading or parsing the files, users will still see their personal and first business account in the UI.
Does that sound worthwhile?

It's strange that it's giving issues reading from the registry, we do it in other areas and it seems to work fine.

It's strange that it's giving issues reading from the registry, we do it in other areas and it seems to work fine.

@yaichenbaum, I agree. From what I can tell inside the sandbox it can read certain parts of the registry, but not everything.
I don't know if Microsoft protect HKCU\Software\Microsoft completely from being read; or if there is some other logic behind it.

@yaichenbaum, I agree. From what I can tell inside the sandbox it can read certain parts of the registry, but not everything.
I don't know if Microsoft protect HKCU\Software\Microsoft completely from being read; or if there is some other logic behind it.

@AndyMDoyle In that case we should probably do what Gave92 suggested and use the FullTrustProcess for this.

@AndyMDoyle In that case we should probably do what Gave92 suggested and use the FullTrustProcess for this.

@yaichenbaum, I have that almost working but as above, there seems to be some delay in establishing the connection if I create a connection from OneDriveCloudProvider. As OneDriveCloudProvider is constructed and used early in the application startup, it seems the startup finishes and shows before the connection is available.
I'm going to try a few more things to make that more reliable though.

@yaichenbaum, I have that almost working but as above, there seems to be some delay in establishing the connection if I create a connection from OneDriveCloudProvider. As OneDriveCloudProvider is constructed and used early in the application startup, it seems the startup finishes and shows before the connection is available.
I'm going to try a few more things to make that more reliable though.

@AndyMDoyle Yeah it looks like the fulltrust process takes some time (few seconds) to load and establish the connection.
For reference I'm posting below a clear and artistic depiction of the appservice communication in Files:

The UWP app does not speak directly to the fulltrust process, so when "OpenAsync()" returns it only means that you ghave connected to "MessageRelay", no guarantee that the fulltrust process has started and connected to "MessageRelay" itself

@AndyMDoyle Yeah it looks like the fulltrust process takes some time (few seconds) to load and establish the connection.
For reference I'm posting below a clear and artistic depiction of the appservice communication in Files:

The UWP app does not speak directly to the fulltrust process, so when "OpenAsync()" returns it only means that you ghave connected to "MessageRelay", no guarantee that the fulltrust process has started and connected to "MessageRelay" itself

@gave92 @yaichenbaum Here's a rather larger update to get your teeth around. It consists of the following changes:

ICloudProviderDetector no longer accepts an existing list and only concerns itself with returning a new list of CloudProvider objects it cares about
CloudProviderController fires each ICloudProviderDetector off with a task continuation so all detectors can go about their job in parallel
An event handler in CloudProviderController is fired when an ICloudProviderDetector returns any results
Drives listens for this event handler being called, and adds the resulting CloudProvider objects to drivesList, and calls DeviceWatcher_EnumerationCompleted to update the list of drives displayed in the UI
AppServiceConnectionHelper is a single place to go to obtain an app service connection. It is initialised in App.xaml.cs with AppServiceConnectionHelper.Initialize();, and all views, and OneDriveCloudProvider now access and share this single connection instead of constructing multiple connections and passing them around.
AppServiceConnectionHelper has a utility method to check if the connection is in place. Calling AppServiceConnectionHelper.IsConnected() will return a boolean confirming if it was able to send a message and get a matching response back from FullTrust (a simple Marco-Polo shout out to check if the sender gets the expected response back)
OneDriveCloudProvider waits for the app service connection to be established before attempting to load the registry settings. I have added a basic timeout of 60 seconds after which it will give up waiting for the connection to be available and will fail silently

So far, everything I have tested works. All OneDrive accounts appear as they should, folders show data, icons load, and if you have multiple tabs open, a change that utilises FullTrust (such as changing a drive label), updates every tab.
I have also simulated a very long running ICloudProviderDetector by adding await Task.Delay(30000); at the start of DetectAsync(). With this in place, the UI loads straight away as you would want, everything is responsive/usable, and after 30 seconds those cloud provider entries are added to the sidebar.
I know this is rather big change and I have touched a lot of things that aren't specifically OneDrive related. I hope this isn't treading on anyone's toes, and that I haven't inadvertently broken something.
If this is of any use then great; or if you have any issues with it and want to use any of this as a starting point then please feel free to do so!

@gave92 @yaichenbaum Here's a rather larger update to get your teeth around. It consists of the following changes:

ICloudProviderDetector no longer accepts an existing list and only concerns itself with returning a new list of CloudProvider objects it cares about
CloudProviderController fires each ICloudProviderDetector off with a task continuation so all detectors can go about their job in parallel
An event handler in CloudProviderController is fired when an ICloudProviderDetector returns any results
Drives listens for this event handler being called, and adds the resulting CloudProvider objects to drivesList, and calls DeviceWatcher_EnumerationCompleted to update the list of drives displayed in the UI
AppServiceConnectionHelper is a single place to go to obtain an app service connection. It is initialised in App.xaml.cs with AppServiceConnectionHelper.Initialize();, and all views, and OneDriveCloudProvider now access and share this single connection instead of constructing multiple connections and passing them around.
AppServiceConnectionHelper has a utility method to check if the connection is in place. Calling AppServiceConnectionHelper.IsConnected() will return a boolean confirming if it was able to send a message and get a matching response back from FullTrust (a simple Marco-Polo shout out to check if the sender gets the expected response back)
OneDriveCloudProvider waits for the app service connection to be established before attempting to load the registry settings. I have added a basic timeout of 60 seconds after which it will give up waiting for the connection to be available and will fail silently

So far, everything I have tested works. All OneDrive accounts appear as they should, folders show data, icons load, and if you have multiple tabs open, a change that utilises FullTrust (such as changing a drive label), updates every tab.
I have also simulated a very long running ICloudProviderDetector by adding await Task.Delay(30000); at the start of DetectAsync(). With this in place, the UI loads straight away as you would want, everything is responsive/usable, and after 30 seconds those cloud provider entries are added to the sidebar.
I know this is rather big change and I have touched a lot of things that aren't specifically OneDrive related. I hope this isn't treading on anyone's toes, and that I haven't inadvertently broken something.
If this is of any use then great; or if you have any issues with it and want to use any of this as a starting point then please feel free to do so!

Closing and replacing with #3177

Closing and replacing with #3177


Json license list populated by git hash and not version number

The licenseListVersion at https://spdx.org/licenses/licenses.json and https://spdx.org/licenses/exceptions.json is now populated by the git hash and not the version number.
EDIT: Current value is:
  "licenseListVersion": "81e2f82",

Moved from https://github.com/spdx/license-list-XML/issues/1220

@goneall For what it's worth, I also ran into this with the version number in the website index file. I manually updated it from the hash to 3.12 in the copy of index.html before uploading it to the license list website, but looks like we'll want to adjust it especially if it's affecting the JSON files as @alandtse noted.

I think this may have been caused by the move from Travis to Github Actions.
Version is passed in as a parameter to LicenseListPublisher:
https://github.com/spdx/license-list-XML/blob/57b3b0d05625ec14b0ef6d3eef80d4d5a29514da/Makefile#L13
I'll move this back to the LicenseListXML since it is either an issue with the Makefile or the Github Action (not sure which at this point).


Docs: Quickstart page now assumes you're using Ubuntu 16.04 or similar

Ubuntu 16.04 came out in April 2016 and most of us are now using it, so @r-marques suggested we change the Quickstart page (in the docs) to assume they're using Ubuntu 16.04 (or similar).
Note: The version of Python 3 that comes with Ubuntu 16.04 is Python 3.5.2 so I updated that as well.
This resolves #1023

Current coverage is 96.76% (diff: 100%)

Merging #1075 into master will not change coverage

@@             master      #1075   diff @@
==========================================
  Files            48         48
  Lines          2132       2132
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           2063       2063
  Misses           69         69
  Partials          0          0

Powered by Codecov. Last update e7ffcf5...15d28e3


Linking Manager Test Account to Test Account - managerLinkError (INVALID_CHANGE)

I am trying to Link my Google Ads Manager Test Account to a Google Ads Account.
For this I have used the code of the example of the googleAdsTeam.
The Link works well in the Web with the Customer I am trying to link. When I am trying to link it with the API, I am getting an error.
As described in the docs, I have an Google Ads Manager Account with a developer token and a Test Google Ads Manager Account, which is using the same developer token. (As Described in the Google Ads Web)
The error is the following one:
{   "StatusCode": 3,   "Details": "Request contains an invalid argument.",   "RequestId": "qv4ro4X21o6WZmOtcxT5uA",   "Failure": {     "errors": [       {         "errorCode": {           "managerLinkError": "INVALID_CHANGE"         },         "message": "The change for mutate link is invalid.",         "location": {           "fieldPathElements": [             {               "fieldName": "operation"             }           ]         }       }     ],     "requestId": "qv4ro4X21o6WZmOtcxT5uA"   } }
It seems to me that there is an error in the customerClientLink
This is the GoogleAdsService:
` using Google.Ads.Gax.Config;
using Google.Ads.GoogleAds.Config;
using Google.Ads.GoogleAds.Lib;
namespace Sellerverse.shared.googleAdsService;
public class GoogleAdsService
{
private readonly string _managerCustomerId;
private readonly GoogleAdsClient _client;
public GoogleAdsService()
{
    _managerCustomerId = Environment.GetEnvironmentVariable("GOOGLE_ADS_MANAGER_ID") ??
                         throw new InvalidOperationException("GOOGLE_ADS_MANAGER_ID not set");

    var config = new GoogleAdsConfig
    {
        DeveloperToken = Environment.GetEnvironmentVariable("GOOGLE_ADS_API_DEVELOPER_TOKEN"),
        OAuth2Mode = OAuth2Flow.SERVICE_ACCOUNT,
        OAuth2SecretsJsonPath = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS"),
        LoginCustomerId = Environment.GetEnvironmentVariable("GOOGLE_ADS_MANAGER_ID")
    };

    _client = new GoogleAdsClient(config);
}

public GoogleAdsClient GetClient()
{
    return _client;
}

public string GetManagerCustomerId()
{
    return _managerCustomerId;
}

} `
This seems to me correct, because there is no Authentication error or Authorization error which comes normally first and because it came already, but I fixed this already.
This is the GoogleAdsApiAdapter, which is the class which communicates with the API
`using Google.Ads.GoogleAds;
using Google.Ads.GoogleAds.V18.Errors;
using Google.Ads.GoogleAds.V18.Resources;
using Google.Ads.GoogleAds.V18.Services;
using Sellerverse.GoogleAdsIntegration.domain;
using Sellerverse.shareddomain;
using Sellerverse.shareddomain.domain;
using GoogleAdsService = Sellerverse.shared.googleAdsService.GoogleAdsService;
using static Google.Ads.GoogleAds.V18.Enums.ManagerLinkStatusEnum.Types;
namespace Sellerverse.GoogleAdsIntegration.infrastructure.adapters.api;
public class GoogleAdsApiAdapter : IGoogleAdsApiAdapter
{
private readonly GoogleAdsService _googleAdsService;
public GoogleAdsApiAdapter(GoogleAdsService googleAdsService)
{
    _googleAdsService = googleAdsService;
}

public async Task LinkGoogleAdsAccount(TenantId tenantId, GoogleAdsCustomerId customerId)
{
    var client = _googleAdsService.GetClient();
    var managerCustomerId = _googleAdsService.GetManagerCustomerId();
    var numericCustomerId = customerId.GetNumericCustomerId();

    var customerClientLinkService = client.GetService(Services.V18.CustomerClientLinkService);
    var customerClientLink = new CustomerClientLink
    {
        ClientCustomer = ResourceNames.Customer(numericCustomerId),
        Status = ManagerLinkStatus.Pending
    };

    var customerClientLinkOperation = new CustomerClientLinkOperation
    {
        Create = customerClientLink
    };

    try
    {
        var response = await customerClientLinkService.MutateCustomerClientLinkAsync(managerCustomerId,
            customerClientLinkOperation);
        Console.WriteLine(response.Result.ResourceName);
    }
    catch (Exception e)
    {
        Console.WriteLine(e);
        throw new Exception("Failed to link Google Ads account");
    }
}

}`
The managerCustomerId is in the Format '2167491529' as well as the numericCustomerId.
As you can expect, the managerCustomerId is my manager test account and the customerId is the test account to link with.
Is there anything I am not seeing at this point?
Small addition: I have tried this with dotnet 6.0 and 7.0 with the GoogleAds.Ads.GoogleAds NuGet with the version 21.1.1 which officially supports dotnet 6.0.
Thank you for your help.

Hi, this seems to be an issue with the API itself rather than with the .NET client library.
Can you please reach out to the API support team here?
Thanks!


Feature Request: Open a new terminal to run receipt like Makefile extension

Is it possible to run a receipt on a new terminal?
It would help to see the receipt log immediately after running.
Currently, I need to open the output and switch to vscode-just to see the result.
Reference: Makefile Extension
Example:
https://github.com/user-attachments/assets/28455153-565c-49b6-8b96-9f8c28679df9

Yeah good idea. Would creating a new terminal per task to isolate output/logging (especially for long running tasks) or reusing the terminal as make does be preferred?

I'd probably prefer reusing the same terminal, rather than have some unbounded history to have to clean up later.

@nigels-com One thing to consider here is a single terminal is will mean recipe commands get queued. For example, running a recipe that starts a docker container would block any other commands being run.