[CT-1094] [Bug] BigQuery oauth-secrets refresh token profile not authenticating

Describe the bug
I've tried to setup a oauth-secrets profile to connect with my BigQuery warehouse following the instruction on https://docs.getdbt.com/reference/warehouse-profiles/bigquery-profile#oauth-token-based.
However, I'm unable to authneticate when I try to do a dbt run -m <some model>
Steps To Reproduce
Here's my profile,
bigquery_oauth:
  target: dev
  outputs:
    dev:
      type: bigquery
      method: oauth-secrets
      project: myproject
      threads: 1
      schema: dbt_varun
      refresh_token: "myrefreshtoken"
      client_id: myclientid
      client_secret: myclientsecret
      token_uri: https://www.googleapis.com/oauth2/v4/token

and I've specified this profile in my project yml and I'm running with dbt run -m <some model>.
Expected behavior
I would expect the model to run without issue.
Screenshots and log output
I get the following error
$ dbt run -m ./models/example/my_first_dbt_model
dbt run -m my_first_dbt_model
19:42:57  Running with dbt=1.2.1
19:42:57  Unable to do partial parsing because of a dbt version mismatch. Saved manifest version: 1.2.0. Current version: 1.2.1.
19:42:58  [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bigquery-integration.example

19:42:58  Found 2 models, 4 tests, 0 snapshots, 0 analyses, 285 macros, 0 operations, 12 seed files, 0 sources, 0 exposures, 0 metrics
19:42:58
19:43:00  Encountered an error:
Runtime Error
  Unable to generate access token, if you're using impersonate_service_account, make sure your initial account has the "roles/iam.serviceAccountTokenCreator" role on the account you are trying to impersonate.

  ('invalid_scope: Bad Request', {'error': 'invalid_scope', 'error_description': 'Bad Request'})
19:43:00  Traceback (most recent call last):
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 194, in exception_handler
    yield
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 611, in _retry_and_handle
    return retry.retry_target(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 190, in retry_target
    return target()
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/impl.py", line 186, in query_schemas
    return [ds.dataset_id for ds in all_datasets]
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/impl.py", line 186, in <listcomp>
    return [ds.dataset_id for ds in all_datasets]
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 208, in _items_iter
    for page in self._page_iter(increment=False):
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 244, in _page_iter
    page = self._next_page()
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 373, in _next_page
    response = self._get_next_page_response()
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 432, in _get_next_page_response
    return self.api_request(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 440, in api_request
    return self._call_api(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 782, in _call_api
    return call()
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 283, in retry_wrapped_func
    return retry_target(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 190, in retry_target
    return target()
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 482, in api_request
    response = self._make_request(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 341, in _make_request
    return self._do_request(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 379, in _do_request
    return self.http.request(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/auth/transport/requests.py", line 545, in request
    self.credentials.before_request(auth_request, method, url, request_headers)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/auth/credentials.py", line 133, in before_request
    self.refresh(request)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/oauth2/credentials.py", line 302, in refresh
    ) = reauth.refresh_grant(
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/oauth2/reauth.py", line 347, in refresh_grant
    _client._handle_error_response(response_data)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/google/oauth2/_client.py", line 62, in _handle_error_response
    raise exceptions.RefreshError(error_details, response_data)
google.auth.exceptions.RefreshError: ('invalid_scope: Bad Request', {'error': 'invalid_scope', 'error_description': 'Bad Request'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/main.py", line 129, in main
    results, succeeded = handle_and_check(args)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/main.py", line 191, in handle_and_check
    task, res = run_from_args(parsed)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/main.py", line 238, in run_from_args
    results = task.run()
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 470, in run
    result = self.execute_with_hooks(selected_uids)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 432, in execute_with_hooks
    self.before_run(adapter, selected_uids)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/run.py", line 442, in before_run
    self.create_schemas(adapter, required_schemas)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 555, in create_schemas
    existing_schemas_lowered.update(ls_future.result())
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/utils.py", line 480, in connected
    return func(*args, **kwargs)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 532, in list_schemas
    for s in adapter.list_schemas(database_quoted)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/impl.py", line 188, in list_schemas
    return self.connections._retry_and_handle(msg="list dataset", conn=conn, fn=query_schemas)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 610, in _retry_and_handle
    with self.exception_handler(msg):
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/varun/dbt/dbt-integration-projects/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 213, in exception_handler
    raise RuntimeException(message)
dbt.exceptions.RuntimeException: Runtime Error
  Unable to generate access token, if you're using impersonate_service_account, make sure your initial account has the "roles/iam.serviceAccountTokenCreator" role on the account you are trying to impersonate.

  ('invalid_scope: Bad Request', {'error': 'invalid_scope', 'error_description': 'Bad Request'})

System information
The output of dbt --version:
dbt 1.2.1

The operating system you're using: Linux
The output of python --version: 3.10.5
Additional context
I'm using a script to get the refresh token. I can confirm the refresh token is in fact valid -- I've used another nodejs script with the nodejs bigquery library to connect with BigQuery without any issues. The script I'm using to get the refresh token is https://github.com/googleapis/nodejs-bigquery/blob/main/samples/auth-user-sample/authUserFlow.js with some very minor tweaks.
I've also use this script to get the access_token and I've setup a oauth-secrets temporary token profile. That profile works without any issues and I'm able to run dbt run -m <some model> on the same BigQuery warehouse and same dbt project.
bigquery_oauth_temp_token:
  target: dev
  outputs:
    dev:
      type: bigquery
      method: oauth-secrets
      project: myproject
      threads: 1
      schema: dbt_varun
      token: "myaccesstoken"

Hey there, I'm trying to reproduce the issue, but I'm still struggling with our OAuth setup. Hopefully it should be resolved soon ;)

Thanks Florian, if I can help, please let me know.

Hi @varun-dc,
Could you try the following Python code? It's basically what's being called by the adapter to establish a client to bigquery:
import google.cloud.bigquery
from google.oauth2 import (
    credentials as GoogleCredentials
)

creds = GoogleCredentials.Credentials(
        token="",
        refresh_token="refresh_token",
        client_id="client_id",
        client_secret="client_secret",
        token_uri="token_uri",
        scopes="https://www.googleapis.com/auth/bigquery",
    )

clientOauth2 = google.cloud.bigquery.Client(
            "biquery_project",
            creds
        )

query_job = clientOauth2.query(
    """
    SELECT
      CONCAT(
        'https://stackoverflow.com/questions/',
        CAST(id as STRING)) as url,
      view_count
    FROM `bigquery-public-data.stackoverflow.posts_questions`
    WHERE tags like '%google-bigquery%'
    ORDER BY view_count DESC
    LIMIT 10"""
)

Which is pulled from get_google_credentials and get-bigquery_client. I'm sorry for the inconvenience, but it's pretty challenging to debug these auth issues.

That's just a Python script I should run? Okay, I'll give it a go and get back to you

I tried it,

With the code you provided above and my refresh_token, client_id and client_secret values filled in (expand this to see the code I ran, but it's same as the above you posted above)
```
import google.cloud.bigquery
from google.oauth2 import (
    credentials as GoogleCredentials
)
creds = GoogleCredentials.Credentials(
token="",
refresh_token="...........",
client_id=".........",
client_secret=".........",
token_uri="https://www.googleapis.com/oauth2/v4/token",
scopes="https://www.googleapis.com/auth/bigquery",
)
clientOauth2 = google.cloud.bigquery.Client(
"biquery_project",
creds
)
query_job = clientOauth2.query(
"""
SELECT
CONCAT(
'https://stackoverflow.com/questions/',
CAST(id as STRING)) as url,
view_count
FROM bigquery-public-data.stackoverflow.posts_questions
WHERE tags like '%google-bigquery%'
ORDER BY view_count DESC
LIMIT 10"""
)
</details>

I get this error

python auth.py
Traceback (most recent call last):
File "/home/work-dc/itmp/python-bigquery-test/auth.py", line 20, in
query_job = clientOauth2.query(
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 3390, in query
future = do_query()
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 3367, in do_query
query_job._begin(retry=retry, timeout=timeout)
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/job/query.py", line 1298, in _begin
super(QueryJob, self)._begin(client=client, retry=retry, timeout=timeout)
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/job/base.py", line 510, in _begin
api_response = client._call_api(
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 782, in _call_api
return call()
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 283, in retry_wrapped_func
return retry_target(
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 190, in retry_target
return target()
File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/_http/init.py", line 494, in api_request
raise exceptions.from_http_response(response)
google.api_core.exceptions.BadRequest: 400 POST https://bigquery.googleapis.com/bigquery/v2/projects/biquery_project/jobs?prettyPrint=false: ProjectId and DatasetId must be non-empty

Location: None
Job ID: e3aae496-ce20-4888-8c84-8b74f8edd01c

I realized my mistake, I have to update the first arg to clientOauth2.query, that's the proeject id.

I also modified the scopes because it was giving me,
>>> python auth.py                                                                                Traceback (most recent call last):
  File "/home/work-dc/itmp/python-bigquery-test/auth.py", line 20, in <module>
    query_job = clientOauth2.query(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 3390, in query
    future = do_query()
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 3367, in do_query
    query_job._begin(retry=retry, timeout=timeout)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/job/query.py", line 1298, in _begin
    super(QueryJob, self)._begin(client=client, retry=retry, timeout=timeout)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/job/base.py", line 510, in _begin
    api_response = client._call_api(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 782, in _call_api
    return call()
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 283, in retry_wrapped_func
    return retry_target(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 190, in retry_target
    return target()
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 482, in api_request
    response = self._make_request(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 341, in _make_request
    return self._do_request(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 379, in _do_request
    return self.http.request(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/auth/transport/requests.py", line 585, in request
    self.credentials.refresh(auth_request)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/oauth2/credentials.py", line 302, in refresh
    ) = reauth.refresh_grant(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/oauth2/reauth.py", line 347, in refresh_grant
    _client._handle_error_response(response_data)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/oauth2/_client.py", line 62, in _handle_error_response
    raise exceptions.RefreshError(error_details, response_data)
google.auth.exceptions.RefreshError: ('invalid_scope: Some requested scopes were invalid. {invalid=[a, b, c, e, g, h, i, l, m, ., /, o, p, q, r, s, t, u, w, y, :]}', {'error': 'invalid_scope', 'error_description': 'Some requested scopes were invalid. {invalid=[a, b, c, e, g
, h, i, l, m, ., /, o, p, q, r, s, t, u, w, y, :]}', 'error_uri': 'https://developers.google.com/identity/protocols/oauth2'})

And then I get this error,
>>> python auth.py
Traceback (most recent call last):
  File "/home/work-dc/itmp/python-bigquery-test/auth.py", line 23, in <module>
    query_job = clientOauth2.query(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 3390, in query
    future = do_query()
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 3367, in do_query
    query_job._begin(retry=retry, timeout=timeout)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/job/query.py", line 1298, in _begin
    super(QueryJob, self)._begin(client=client, retry=retry, timeout=timeout)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/job/base.py", line 510, in _begin
    api_response = client._call_api(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 782, in _call_api
    return call()
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 283, in retry_wrapped_func
    return retry_target(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 190, in retry_target
    return target()
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 482, in api_request
    response = self._make_request(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 341, in _make_request
    return self._do_request(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 379, in _do_request
    return self.http.request(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/auth/transport/requests.py", line 585, in request
    self.credentials.refresh(auth_request)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/oauth2/credentials.py", line 302, in refresh
    ) = reauth.refresh_grant(
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/oauth2/reauth.py", line 347, in refresh_grant
    _client._handle_error_response(response_data)
  File "/home/work-dc/itmp/python-bigquery-test/venv/lib/python3.10/site-packages/google/oauth2/_client.py", line 62, in _handle_error_response
    raise exceptions.RefreshError(error_details, response_data)
google.auth.exceptions.RefreshError: ('invalid_scope: Bad Request', {'error': 'invalid_scope', 'error_description': 'Bad Request'})

I think it should work with nodejs, as I've got an app that uses nodejs and it's working fine in the app. Let me setup that script and share it for reference.

One thing I may have missed is that the token should be None and not """:
creds = GoogleCredentials.Credentials(
        token= None,
        refresh_token="refresh_token",
        client_id="client_id",
        client_secret="client_secret",
        token_uri="https://oauth2.googleapis.com/token",
        scopes="https://www.googleapis.com/auth/bigquery",
    )

Sorry about that.

I tried that with None, no improvement
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})

I'm attempting to isolate my nodejs app's code into a minimal working example to share with you, but for whatever reason, I don't understand yet, I can't get it to work after I pull the bits out and into a script, bigquery just keeps failing with a similar 'grant' issue.
I'll share the script once I have it working.

Does the script you've shared with me work for you?

The script you sent me works. It's very sensitive to the scopes, any mismatch causes Google Cloud to throw an error
Here's the exact script I used, the refresh_token, client_id, client_secret` are the only values that need to be filled in here,
import google.cloud.bigquery
from google.oauth2 import (
    credentials as GoogleCredentials
)

creds = GoogleCredentials.Credentials(
        token=None,
        refresh_token="...",
        client_id="...",
        client_secret="...",
        token_uri="https://www.googleapis.com/oauth2/v4/token",
        scopes=[
            "https://www.googleapis.com/auth/bigquery",
            #  "https://www.googleapis.com/auth/cloud-platform.read-only",
        ]
    )

clientOauth2 = google.cloud.bigquery.Client(
            "deepchannel-integration",
            creds,
        )

query_job = clientOauth2.query(
    """
    SELECT
      CONCAT(
        'https://stackoverflow.com/questions/',
        CAST(id as STRING)) as url,
      view_count
    FROM `bigquery-public-data.stackoverflow.posts_questions`
    WHERE tags like '%google-bigquery%'
    ORDER BY view_count DESC
    LIMIT 10"""
)
print(query_job)

And then it was working fine.
I'm using https://github.com/googleapis/nodejs-bigquery/blob/main/samples/auth-user-sample/authUserFlow.js to get the refresh token and it also specifies the scope. If there's a mismatch, the error is thrown.

Next I tried this token with dbt in a bigquery project again
$ dbt run -m my_first_dbt_model
09:53:58  Running with dbt=1.2.1
09:53:58  [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.bigquery-integration.example

09:53:58  Found 2 models, 4 tests, 0 snapshots, 0 analyses, 285 macros, 0 operations, 12 seed files, 0 sources, 0 exposures, 0 metrics
09:53:58
09:53:58  Encountered an error:
Runtime Error
  Unable to generate access token, if you're using impersonate_service_account, make sure your initial account has the "roles/iam.serviceAccountTokenCreator" role on the account you are trying to impersonate.

  The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_uri, client_id, and client_secret.
09:53:58  Traceback (most recent call last):
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 194, in exception_handler
    yield
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 611, in _retry_and_handle
    return retry.retry_target(
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 190, in retry_target
    return target()
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/impl.py", line 186, in query_schemas
    return [ds.dataset_id for ds in all_datasets]
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/impl.py", line 186, in <listcomp>
    return [ds.dataset_id for ds in all_datasets]
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 208, in _items_iter
    for page in self._page_iter(increment=False):
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 244, in _page_iter
    page = self._next_page()
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 373, in _next_page
    response = self._get_next_page_response()
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/page_iterator.py", line 432, in _get_next_page_response
    return self.api_request(
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 440, in api_request
    return self._call_api(
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 782, in _call_api
    return call()
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 283, in retry_wrapped_func
    return retry_target(
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/api_core/retry.py", line 190, in retry_target
    return target()
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 482, in api_request
    response = self._make_request(
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 341, in _make_request
    return self._do_request(
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/cloud/_http/__init__.py", line 379, in _do_request
    return self.http.request(
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/auth/transport/requests.py", line 545, in request
    self.credentials.before_request(auth_request, method, url, request_headers)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/auth/credentials.py", line 133, in before_request
    self.refresh(request)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/google/oauth2/credentials.py", line 290, in refresh
    raise exceptions.RefreshError(
google.auth.exceptions.RefreshError: The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_uri, client_id, and client_secret.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/main.py", line 129, in main
    results, succeeded = handle_and_check(args)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/main.py", line 191, in handle_and_check
    task, res = run_from_args(parsed)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/main.py", line 238, in run_from_args
    results = task.run()
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 470, in run
    result = self.execute_with_hooks(selected_uids)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 432, in execute_with_hooks
    self.before_run(adapter, selected_uids)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/run.py", line 442, in before_run
    self.create_schemas(adapter, required_schemas)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 555, in create_schemas
    existing_schemas_lowered.update(ls_future.result())
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/utils.py", line 480, in connected
    return func(*args, **kwargs)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/task/runnable.py", line 532, in list_schemas
    for s in adapter.list_schemas(database_quoted)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/impl.py", line 188, in list_schemas
    return self.connections._retry_and_handle(msg="list dataset", conn=conn, fn=query_schemas)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 610, in _retry_and_handle
    with self.exception_handler(msg):
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/varun-dc/bigquery-integration/venv/lib/python3.10/site-packages/dbt/adapters/bigquery/connections.py", line 213, in exception_handler
    raise RuntimeException(message)
dbt.exceptions.RuntimeException: Runtime Error
  Unable to generate access token, if you're using impersonate_service_account, make sure your initial account has the "roles/iam.serviceAccountTokenCreator" role on the account you are trying to impersonate.

  The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_uri, client_id, and client_secret.

What kind of credentials are you using on bigquery side? Are you using a service account somehow? Can you share a bit more about your current configuration?
I'm struggling to get a refresh token - even via the code you linked to. The response_type=code from the URL that's generated gets thrown out during the authentication flow (Error 400: invalid_request. Required parameter is missing: response_type). No idea what I'm missing here.
For dbt-bigquery, the credentials are defined there:
    # oauth-secrets
    token: Optional[str] = None
    refresh_token: Optional[str] = None
    client_id: Optional[str] = None
    client_secret: Optional[str] = None
    token_uri: Optional[str] = None

...

    scopes: Optional[Tuple[str, ...]] = (
        "https://www.googleapis.com/auth/bigquery",
        "https://www.googleapis.com/auth/cloud-platform",
        "https://www.googleapis.com/auth/drive",
    )

And wired-up a bit later:

        elif method == BigQueryConnectionMethod.OAUTH_SECRETS:
            return GoogleCredentials.Credentials(
                token=profile_credentials.token,
                refresh_token=profile_credentials.refresh_token,
                client_id=profile_credentials.client_id,
                client_secret=profile_credentials.client_secret,
                token_uri=profile_credentials.token_uri,
                scopes=profile_credentials.scopes,
            )

But that last trace is showing the error atcredentials.py", line 290 which is oauth and not oauth-secrets. Can you please make sure your profiles.yml still use the right connection type?

Any chance we should sync up over a screenshare to discuss everything in detail? If you're struggling to get a refresh token, I can show you exactly what I'm doing to set it, that may help unblock you on that part.

I don't have time today to full digest your message, but I'll read it tomorrow morning and get back to you as soon as I'm able.
I do believe we've got a service account. How it relates to OAuth, I unfortunately am not experienced enough with Google Cloud to tell you precisely.
The details I pass into that script I've shared is client id, client secret and scopes, and it outputs a refresh_token...the refresh token is actually the 'code' in the URL it tells you to input in the script.
For example, after I authorize on the Google login page, I get a URL like,
http://localhost:38038/?code=4/0AdQt8qilUcx4N4sARj223423423423423UwSc7d1-V2342343234234235E1IdGvFdtA&scope=https://www.googleapis.com/auth/bigquery%20https://www.googleapis.com/auth/cloud-platform.read-only
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                      this is the refresh token

What kind of credentials are you using on bigquery side? Are you using a service account somehow? Can you share a bit more about your current configuration?

Do you need something more specific than my dbt/profiles.yml? I'm using this exact yml,
bigquery_oauth:
  target: dev
  outputs:
    dev:
      type: bigquery
      method: oauth-secrets
      project: ....................
      threads: 1
      schema: dbt_varun
      refresh_token: .......................

      client_id: ....................apps.googleusercontent.com
      client_secret: .....................

Please find a time slot that works for you there: https://calendly.com/florian-eiden :)

Thanks a lot for your repo, it helped me finish my setup and I was able to reproduce the behaviour.
The default scopes are instead too large, and for you like for me, get rejected. The error message is far from helpful here.
The good news is that you can override the default scopes by using the optional configuration options:
my-profile:
  target: dev
  outputs:
    dev:
      type: bigquery
      method: oauth
      project: abc-123
      dataset: my_dataset
      scopes:
        - https://www.googleapis.com/auth/bigquery

I tried it and it goes through for me. Let me know how that goes.

Thanks @Fleid , with the addition of the scopes I was able to successfully do a dbt run
For future reference, my profile looks like this,
bigquery_oauth:
  target: dev
  outputs:
    dev:
      type: bigquery
      method: oauth-secrets
      project: <my project>
      threads: 1
      schema: <my schema>
      refresh_token: <refresh token>
      client_id: <my client id>.apps.googleusercontent.com
      client_secret: <my client secret>
      token_uri: https://www.googleapis.com/oauth2/v4/token
      scopes:
        - https://www.googleapis.com/auth/bigquery

Do the dbt docs needs to be updated to make this easier for other users? Or can we modify the error messages reported by dbt to make it easier to narrow down this issue? For example, if the error message say,

('invalid_scope: Bad Request', {'error': 'invalid_scope', 'error_description': 'Bad Request'}

And if the user hasn't specified scopes, we can suggest the user add scopes to the profile/target and link them to that dbt docs page.
Additionally, should the default scopes be changed so dbt works by default in this case?

Updating the doc : yes, on my to-do
Changing the default scope : I'm considering it, but am a bit concerned of the consequences for users already relying on them, this would be a breaking change
Updating the error message : I want that, but I think aren't we just relying the error message from the GCP API call? Not sure we can detect that on the fly?

Closing the issue, still need to update the doc...


nixos/opendkim: Deprecate configFile in favor of settings option

Motivation for this change
Because https://github.com/NixOS/nixpkgs/pull/75584 still takes some work and I saw https://github.com/NixOS/nixpkgs/pull/78126, I decided to implement the settings concept from NixOS/rfcs#42 for opendkim. This makes everything much nicer, especially for third-party code like nixos-mailserver (for which I will submit a PR to make it compatible with the changes here).
Unfortunately I found no backwards compatible way to keep configFile working, so I just removed it, which also simplifies the module a lot, and in addition allows other modules to read values from settings (which wouldn't always be possible with a configFile option).
I have yet to test this properly.
Removes the need for https://github.com/NixOS/nixpkgs/pull/78126 and closes https://github.com/NixOS/nixpkgs/issues/27260
Ping @aanderse @qknight @abbradar @brprice @Valodim
Things done

[ ] Tested it

Now tested this successfully, would like to merge soon.
@aanderse What do you think about having configFile options in addition to settings options? Because if both of them exist, there's the problems:

Assigning to settings doesn't guarantee that it ends up in the configFile (if the user overrides the generated one)
Modules can't read settings reliably at evaluation time, because if configFile is specified, all the settings ones won't apply.

Previously I argued that it makes sense to allow configFile because sometimes you just want to set this directly, or to an impure path. But now I'm thinking this would better be done by overriding ExecStart or so directly (with a mkForce, indicating that something (above things) break).

Also opened a PR for nixos-mailserver to support the changes in this PR: https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/merge_requests/162

You raise some valid points. Currently some modules already have a configFile (or equivalent) option and they document that using that option will nullify certain other options. I don't see any material difference between a configFile nullifying module options or settings values - it just needs to be documented. I worry removing the configFile mostly just makes the escape hatch harder.
Just a quick idea off the top of my head, but for bonus points modules could add assertions if users have set the configFile option as well as setting options which are ignored in that case.
assertions = [
  { assertion = cfg.settings != defaultSettings -> cfg.configFile == configFile;
    message = ''
      You specified both a custom config so `settings` will be ignored.
    '';
  }
];

Or something like that. Maybe that is overboard, though.

@aanderse The problem with that is: If settings or configFile are set by third-party modules (which the user can't control directly), then this assertion prevents the user from using configFile or settings respectively.
Okay how about this: There is a configFile option, but the default is specified as configFile = generatedConfigFile, without mkDefault, meaning for users to change it, they have to mkForce it (which I'm again taking to mean that one is leaving intended territory, and things may not work because of it). The description could point this out, saying

If you override this option, settings won't apply and can contain incorrect values, which third-party modules may rely on. This is outside of supported territory

That sounds like a good idea :+1:

@aanderse Though in this case I'd still like to remove the previous configFile option, because it won't have the same meaning as after this change: Previously part of the settings were passed in via command line arguments, meaning you wouldn't have to specify them in the config file. But after this change, all settings are passed via the config file. Meaning if you previously set configFile, you wouldn't pass the command line settings after this change.


Fix docSum ui error in accessing parsed files

Description
Fix docSum ui error in accessing parsed files.
Issues
https://github.com/opea-project/GenAIExamples/issues/1065
Type of change
List the type of change like below. Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would break existing design and interface)
[ ] Others (enhancement, documentation, validation, etc.)

Dependencies
no.
Tests
CI pass.

Add HABANA_VISIBLE_DEVICES: all ENV for habana 1.18.0 driver.


No matching version found for some package.

Describe the bug
Occasionally, when installing some packages, you will encounter the following error:
(base)  ✘ cobolbaby@itc180012  /media/cobolbaby/data/ubuntu/opt/workspace/git/rpi-manager   S03F ●  npm i<EMAIL_ADDRESS>npm ERR! code ETARGET
npm ERR! notarget No matching version found for<EMAIL_ADDRESS>npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/cobolbaby/.npm/_logs/2020-10-28T01_48_42_538Z-debug.log

verdaccio storage:

verdaccio response:

Hello,
Well, not sure what to suggest. Could you build a set of reproducible steps ? Example repo. You might have external factors. Unfortunately the log provided does not says much.

This problem occurs occasionally, and there is no clear way to reproduce it.
However, when this problem occurs, you can see that the response code of verdaccio is 304. I am not sure which part of the request has the problem.

I am seeing a similar issue and it seems to occur when the versions property in the storage/<PACKAGE_NAME>/package.json file is not populated at all. Populating this with values from registry.npmjs.org seems to allow downstream npm clients to work correctly.

I am seeing a similar issue and it seems to occur when the versions property in the storage/<PACKAGE_NAME>/package.json file is not populated at all. Populating this with values from registry.npmjs.org seems to allow downstream npm clients to work correctly.

yeah, in your case seems the file was corrupted, I've seen that happening before.

@juanpicado The bug is concentrated in the latest packages under @babel.

?? Could you elaborate your comment ?

If the project depends on a dependent package of a different version, will the server return 304 response code?

If the project depends on a dependent package of a different version, will the server return 304 response code?

The server only returns what the package manager ask for. The 304 only happens if the cache has not expired yet eTag.
Can we close this issue?

Under normal circumstances, the last modification time of package.json of a package is the same as the creation time of the latest version of the package, but under abnormal conditions, these two values are different.
This situation is the same as no rollback when the database transaction is abnormal.

Any way to reproduce this ?

Temporarily unable to reproduce the problem stably.

@juanpicado  After several verifications, it was found that the problem occurred when multiple uplinks were configured.
Ref: https://verdaccio.org/docs/en/packages#use-multiple-uplinks

When I executed the following command, I also encountered this problem.
(base)  ✘ cobolbaby@itc180012  /tmp/demo  npm i --save --verbose<EMAIL_ADDRESS>npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'i',
npm verb cli   '--save',
npm verb cli   '--verbose',
npm verb cli   '<EMAIL_ADDRESS>]
npm info using<EMAIL_ADDRESS>npm info using<EMAIL_ADDRESS>npm verb npm-session db05d4415b559497
npm http fetch GET 304 http://npm.itc.inventec/@babel%2ftypes 111ms (from cache)
npm http fetch GET 304 http://npm.itc.inventec/@babel%2ftypes 72ms (from cache)
npm timing stage:rollbackFailedOptional Completed in 2ms
npm timing stage:runTopLevelLifecycles Completed in 223ms
npm verb type version
npm verb stack @babel/types: No matching version found for<EMAIL_ADDRESS>npm verb stack     at pickManifest (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:101:11)
npm verb stack     at fetchPackument.then.packument (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:43:18)
npm verb stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
npm verb stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
npm verb stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
npm verb stack     at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
npm verb stack     at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
npm verb stack     at _drainQueueStep (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12)
npm verb stack     at _drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
npm verb stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
npm verb stack     at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
npm verb stack     at processImmediate (internal/timers.js:443:21)
npm verb cwd /tmp/demo
npm verb Linux 4.15.0-142-generic
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--save" "--verbose" "<EMAIL_ADDRESS>npm verb node v11.14.0
npm verb npm  v6.7.0
npm ERR! code ETARGET
npm ERR! notarget No matching version found for<EMAIL_ADDRESS>npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm verb exit [ 1, true ]
npm timing npm Completed in 518ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/cobolbaby/.npm/_logs/2021-06-01T09_23_09_543Z-debug.log

Package related files stored on the server side:
types.tar.gz
Ps: In summary, I found that verdaccio always has problems pulling some packages released in the last one or two days

@juanpicado
Today I saw a reply https://github.com/verdaccio/verdaccio/issues/1854#issuecomment-867158431 from you. I finally realized the root cause of the issue. I set the maxage of the npmjs uplink to 7d, which may cause problems when installing the latest package.
Please correct the description of maxage in the official document. Obviously, the current description can easily cause some misunderstandings.

the time threshold to the cache is valid

Finally, I want to confirm again whether the downloaded package has no expiration time?

the downloaded package has no expiration time?

the tarball does not, only the package.json === metadata does expires.
This is just a quick reply, I'll extend my thoughts later.


Some people appear multiple times on Contributors page

http://lib.haxe.org/u/
Seems to be the case quite frequently.

 That's a lot of people with multiple accounts then! :D

A simple sql query shows that there are 32 users with duplicated login names (actually I have 5 entries O_o). I'll try dealing with the those that have the same password and email

The login function uses select which returns the first matching line,
so it should be safe to remove all copies after the first one.


Replace deprecated React.PropTypes

https://github.com/headzoo/react-moment/pull/21
https://github.com/headzoo/react-moment/issues/20
https://github.com/headzoo/react-moment/pull/18
I take Sergio Cruz's PR and rebuilt dist

Thanks for the fix. I am using your fork in the meantime +1


chore: add repo icon

shows up in SourceTree for instance, making it easier to find different repos in the mess.

:tada: This PR is included in version 0.15.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Utils.numToBytes(long value, boolean withCRLF) always return null if withCRLF is a false value

why does this method always return null if withCRKF input is a false value
        long originalNum = 10;
        byte[] bytes = Utils.numToBytes(originalNum, false); // --> bytes = null ?

it's a bug, but in proxy logic, withCRKF always setting true.

https://github.com/netease-im/camellia/commit/a7c746d05d3994238200eff9108cca9d57247c48
this bug will be fixed in 1.1.3

thank you for your support 👍
:"D


[PE-D][Tester C] Un-updated invalid command message

The app still have address book in it when entering invalid add command

Labels: type.FunctionalityBug severity.Low
original: gerardstevan/ped#1

Change "address book" to TAB.


Validate image passed to ukvm is in ELF format

Since ukvm expects its payload to be in ELF format, validate that the ELF header has expected magic characters. Without the validation, any image format (ex: qcow2, which is the default OSv image format) is loaded successfully, and vcpu_loop execution fails with KVM_EXIT_SHUTDOWN (Issue 13).
This PR attempts to validate ELF magic characters in the loaded code so that -
a) user is informed of mismatched image format
b) ukvm does not attempt to get into vcpu_loop with a corrupt guest

Testing Done:
Invalid image without validation:
root@ubuntu:~/solo5/tests/test_hello# ./ukvm-bin /tmp/osv-images/ukvm.img
Setting the CPUID.
ukvm-bin: exit_reason = 0x8
root@ubuntu:~/solo5/tests/test_hello#

Invalid image with ELF validation:
root@ubuntu:~/solo5/tests/test_hello# ./ukvm-bin /tmp/osv-images/ukvm.img
ukvm-bin: /tmp/osv-images/ukvm.img is not in ELF format
: Success
root@ubuntu:~/solo5/tests/test_hello# file /tmp/osv-images/ukvm.img
/tmp/osv-images/ukvm.img: QEMU QCOW Image (v3),<PHONE_NUMBER>0 bytes

Valid image:
root@ubuntu:~/solo5/tests/test_hello# ./ukvm-bin test_hello.ukvm
Setting the CPUID.
            |      ___|
  __|  _ \  |  _ \ __ \
\__ \ (   | | (   |  ) |
____/\___/ _|\___/____/
mem_size=20000000, kernel_end=10e000
Initializing the KVM Paravirtualized clock.
Hello, World
Command line is:
solo5_app_main() returned with 0
Kernel done.
Goodbye!
KVM_EXIT_HLT
root@ubuntu:~/solo5/tests/test_hello# file test_hello.ukvm
test_hello.ukvm: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped

Hi @myechuri. Thanks for this. Would you mind re-working it to inline the test directly into load_code()? Also, it might be worth adding a check for e_ident[EI_CLASS] == ELFCLASS64 && e_type == ET_EXEC && e_machine == EM_X86_64.

Thanks for the quick review, @mato !

Would you mind re-working it to inline the test directly into load_code()?

Sure, happy to. The reason i pulled it out to a function was that i thought it might be cleaner to add additional validation checks in the function in future. Not a strong reason, will rework.

e_ident[EI_CLASS] == ELFCLASS64 e_type == ET_EXEC && e_machine == EM_X86_64

Done. Thanks for suggesting!

Testing done after addressing review comments:
With invalid image:
root@ubuntu:~/solo5/tests/test_hello# file /tmp/osv-images/ukvm.img
/tmp/osv-images/ukvm.img: QEMU QCOW Image (v3),<PHONE_NUMBER>0 bytes
root@ubuntu:~/solo5/tests/test_hello# ./ukvm-bin /tmp/osv-images/ukvm.img
ukvm-bin: /tmp/osv-images/ukvm.img is in invalid ELF64 format
: Success

With valid image:
root@ubuntu:~/solo5/tests/test_hello# ./ukvm-bin ./test_hello.ukvm
Setting the CPUID.
            |      ___|
  __|  _ \  |  _ \ __ \
\__ \ (   | | (   |  ) |
____/\___/ _|\___/____/
mem_size=20000000, kernel_end=10e000
Initializing the KVM Paravirtualized clock.
Hello, World
Command line is:
solo5_app_main() returned with 0
Kernel done.
Goodbye!
KVM_EXIT_HLT
root@ubuntu:~/solo5/tests/test_hello#

Hi @myechuri. A couple more nits:

You should call errx() instead of err(). The latter appends an error message based on errno, which is producing the confusing : Success in your output.
The error message does not need a \n in it, this is appended automatically. (See man err.)

Thanks for taking a second look, @mato.

You should call errx() instead of err()

Thanks for catching! Fixed.

The error message does not need a \n in it, this is appended automatically.

Thanks for pointing out. Fixed.

Thanks @myechuri! Merging.

Thanks for shepherding my first solo5 PR, @mato !


GEOMESA-2949 NiFi - support modifying writes

Now has merge conflicts:(.

oops, https://github.com/locationtech/geomesa/pull/2650 was stacked on top of this one...

merged as part of #2650


Updates, Closes #40, Closes #35

Fixed flag persistence when using console or batch, no longer exits on error from console or batch. Also added query support for Counter example app (ebuchman request, not an issue)

Can we split this out into two PRs?
One with the exit fix and the counter query, the other with the mro.
I think the mro stuff needs more thought, json doesnt seem like a good idea to me anymore (sorry my bad). The point of making the output machine readable is to simplify some of the tests or to make it easier to write more.

Yes, I will remove MRO stuff from this PR, and will open a new one once we come to a better idea on what specifically we want.. maybe continue MRO discussion in issue #32

Rebased in https://github.com/tendermint/tmsp/pull/46


Add automatic zip creation

This is currently a draft, if needed I can add functionality to automatically push to Firefox Addon store

Just creating the zip and placing it in the Releases section should be enough.

Okay

Done

Release creation time doesn't need to change, if it's done you can mark it for review

Yeah... So I've probably misread Abort in case the git tag doesn't already exist in the remote repository as Abort in case the git tag already exists in the remote repository. Sorry about that, removing --verify-tag should fix it

Doesn't seem to just work out of the box, does it need any additional setup?


Upgrade esm

Upgrade esm package to fix security alert

@leo yup, working on it

Codecov Report

Merging #2458 into canary will decrease coverage by 0.46%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           canary    #2458      +/-   ##
==========================================
- Coverage   11.25%   10.78%   -0.47%
==========================================
  Files         256      256
  Lines        9238     9186      -52
  Branches     1035     1020      -15
==========================================
- Hits         1040      991      -49
+ Misses       8094     8092       -2
+ Partials      104      103       -1

Impacted Files
Coverage Δ

src/util/dev/builder-cache.ts
69.02% <0%> (-7.95%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a36b9c...6f7a36f. Read the comment docs.

on the note of esm, how one would start to add esm support into @now/node?


Custom metadata UI bug roundup

Results of PR smoke test: https://github.com/ethyca/fides/pull/2536#issuecomment-1423341630
Main checks

[x] No errors seemed to be the API's fault. (No 500; validation errors were correct.)
[x] With the feature flag (customFields) disabled, editing taxonomy entities still works.

Functionality status

Defining custom lists

[x] Create
[x] Use for a field definition

Defining custom fields

[x] Create single select
[x] Create multi select
[x] Cancel button warns about discarding changes

[ ] "Show in forms and reports"

How do we verify this?

Using single select

[x] Initial selection
[ ] Removing selection
[ ] Changing selection
[ ] Initial load when data has been saved

Using multi select

[x] Initial selection
[ ] Removing selection
[ ] Changing selection
[ ] Initial load when data has been saved

[ ] When there are multiple metadata fields
[ ] Switching between taxonomy entities
[x] Switching between resource types

Does seem to reset the form correctly

Bugs

On initial load the spinners don't go away
The requests 404 because no fields have been added to a category

The API is correct to return 404
The UI needs to understand the "nothing exists yet" case
Probably causes the spinners problem

Clicking "edit" on another category doesn't update the custom fields form

Inconsistent
Might only happen if you made change in the form
Wait, unless custom fields are supposed to show up for all data categories? In which case the problem is that the form sometimes forgets which fields to show.

Removing a item from the field select list doesn't remove the item

But if you "Update entity" and refresh the page it will have been saved

Clicking "save" doesn't close the add field modal
Clicking "save" doesn't refresh the custom field form
Having two fields backed by the same select list causes the form fields to get mixed up

This should be fine. They should have the same list of choices, but the values should be independent.
Actually, it might not matter which custom list the fields use. Values seem to attach to the wrong fields sometimes regardless.
Can result in API error response because a single select was passed an array or a multi was passed a string

http://localhost:3000/api/v1/plus/custom-metadata/custom-field

{"custom_field_definition_id":"plu_a5f493f8-cbb7-435d-a94c-f28ec281f4c1","id":"plu_5ee31d1d-7ed2-44fe-9cfb-6970295f0d39","resource_id":"system.operations","value":["a"]}

{"detail":"The value for the specified custom field type must be a string"}

Fields reorder after updating their values
"Update" button stays disabled after request completed
Form fields flicker after update.
Can't update the values of any fields after initially setting them (couldn't tell if this was captured elsewhere here)

Might need to be broken out to its own ticket in the backend:
When adding a custom field value to to a System on the "Describe systems" tab, the first time I passed the value it got stored as an array even though the field was string (single-select). This prevented the value from being visible on later loads (the backend was returning an array, which can't be shown by a single-select input) and also prevented updates.


Support more than 100 repos

Reason/Context
Please try answering few of those questions

Why we need this improvement? We are at 67 repos currently and adding more every week.
How will this change help? We will continue to be able to use this workflow.
What is the motivation? Global Workflows!!!!

oh yes, I knew someone will need it at some point in time. How many you add a week? so I know how much time left until you reach 100 😅

@derberg we are at 68 right now, getting ready to add probably around 10-15 in the next 2 weeks.

@Chris-Softrams available with https://github.com/derberg/global-workflows-support/releases/tag/v0.4.0


FormattedString not working

this is my template
<StackLayout orientation="vertical">

          <FormattedString>
            <FormattedString.spans>

            </FormattedString.spans>
          </FormattedString>

            <Button text="buttonButton" style="text-transform: uppercase;foregroundColor:#00ff00;fontAttributes:Italic">
            </Button>

</StackLayout>

actually, just display the button, no label here.
my question is:

how to use FormattedString  with angular2. (xml & ts)
it seems the style  fontAttributes/foregroundColor not working for the button here
the definition of FormattedString   public fontAttributes: number; it's type of number. but I found all the material about it just accept sth like Italic/Bold. it's not a number

It seems we need a directive that lets you define formattedText in markup. Until that is available, you'd have to define formatted text in JavaScript.
2 and 3 above may be problems with the underlying Label/FormattedText implementation. You should probably open issues for them on the NativeScript/NativeScript repo.

This issue was moved to NativeScript/NativeScript#1914

reopen just for tracking formattedText directive work

@hdeshev thanks for your update. I have to ask why should we have FormattedString & Span. It seems they have similar props. duplicated function I thought.
what about just have one Span directive  for Button/Label ? Is that enough?
I'm new for nativescript, If my question is too stupid, pls show me the correct direction. thanks
<Button>

</Button>

+1

With the new version of NativeScript-Angular FormattedString will be working. However short-hand syntax should be used:
<Button>
    <FormattedString>

    </FormattedString>
</Button>

@dreambo8563 About your third point "the definition of FormattedString public fontAttributes: number; it's type of number. but I found all the material about it just accept sth like Italic/Bold. it's not a number" the reason here is that fontAttributes type actually is an flagged enum and enums represtation in TypeScript is number.
About the second point "it seems the style fontAttributes/foregroundColor not working for the button here" - it also should work just fine with the upcoming version (a.k.a 2.0) of NativeScript.

Still an here on latest version 👍
ns -v
8.4.0
It only display the button.


Support language server protocol

https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md

I believe https://github.com/Microsoft/tolerant-php-parser will support that


Unable to connect to accessory

Expected Behavior
Home app should be able to add HomeBridge as an accessory to the app.
Current Behavior
When trying to add Homebridge as an accessory to the Home app, it crashes HomeBridge and says "Couldn't add Homebridge-479D" inside the Home app.
Steps to Reproduce (for bugs)
Install homebridge on a raspberry pi connected via ethernet.
Setup Payload:
X-HM://0023ISYWYCC90
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
QR CODE HERE
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
CODE HERE
[5/13/2019, 1:23:42 AM] [SmartThings] update_method: direct
[5/13/2019, 1:23:43 AM] Homebridge is running on port 51826.
[5/13/2019, 1:23:43 AM] [SmartThings] Direct Connect Is Listening On <IP_ADDRESS>:8000
[5/13/2019, 1:23:43 AM] [SmartThings] SmartThings Hub Communication Established
[5/13/2019, 1:25:16 AM] TypeError: "list" argument must be an Array of Buffers
    at Function.Buffer.concat (buffer.js:314:13)
    at Object.encode (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)
    at Object.encode (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
    at Object.encode (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
    at HAPServer._handlePairStepFive (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:459:21)
    at HA

As stated above i am unable to connect my homebridge into the home app. The iphone is connected via wifi and the raspberry pi is connected via ethernet but these are the same wifi network. I am using the smarthings plugin from here https://github.com/tonesto7/homebridge-smartthings-tonesto7 but I dont think that is what is causing the issue. I believe this is an issue with the HAP server authentication but not sure what. The same error occurs with a sample config as well.

@evy0311 if possible, can you try update node to some recent version? Like 10.x or 12.x?

Updating my Node version worked. Thanks so much! Im not sure why it was so outdated, and didnt even realize it. Thanks again!

Hi,
I'm having the same issue now. For some reason it suddenly appeared without any update or changes on my side.
NPM version : v6.13.0
Nodejs : v0.10.29 (latest)
Here's the error I get while starting homebridge :
TypeError: "list" argument must be an Array of Buffers     at Function.Buffer.concat (buffer.js:314:13)

Sorry, that log fragment is to short to provide any feedback

Sorry, here’s the full error:
[2019-11-15 12:46:20] Homebridge is running on port 34509.
[2019-11-15 12:46:21] TypeError: "list" argument must be an Array of Buffers
at Function.Buffer.concat (buffer.js:314:13)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)
at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)
at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
[2019-11-15 12:46:21] TypeError: "list" argument must be an Array of Buffers
at Function.Buffer.concat (buffer.js:314:13)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)
at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)
at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
[2019-11-15 12:46:21] Got SIGTERM, shutting down Homebridge...
[2019-11-15 12:46:22] TypeError: "list" argument must be an Array of Buffers
at Function.Buffer.concat (buffer.js:314:13)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)
at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)
at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
[2019-11-15 12:46:22] TypeError: "list" argument must be an Array of Buffers
at Function.Buffer.concat (buffer.js:314:13)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)
at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)
at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
[2019-11-15 12:46:22] TypeError: "list" argument must be an Array of Buffers
at Function.Buffer.concat (buffer.js:314:13)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)
at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)
at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)
at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)

On 15 Nov 2019, at 12:56, Northern Man<EMAIL_ADDRESS>wrote:
Sorry, that log fragment is to short to provide any feedback
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/nfarina/homebridge/issues/2219?email_source=notifications&email_token=AHEEG2NOLASBT5KRQGV5XTDQT2E6RA5CNFSM4HMLS3FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEFHAOY#issuecomment-554332219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEEG2KBZUVXVY7MNUIJ56TQT2E6RANCNFSM4HMLS3FA.

What version of nodejs are you using?
This is not the latest
Nodejs : v0.10.29 (latest)
node -v
v10.16.3

Thank you for your help. I'm not sure I'm using the right commands but from what I can see it shows the latest version already installed, no?
matthieu@BB-8:~ $ node -v v6.11.2 matthieu@BB-8:~ $ nodejs -v v0.10.29 matthieu@BB-8:~ $ sudo apt install nodejs@latest Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package nodejs@latest matthieu@BB-8:~ $ sudo apt install nodejs Reading package lists... Done Building dependency tree        Reading state information... Done nodejs is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.

Nope, those are historic
Google how to install node js on your RPI
It has multiple old versions that need removal, then install the latest

On Nov 15, 2019, at 11:07 AM, matthieudu06<EMAIL_ADDRESS>wrote:

Thank you for your help. I'm not sure I'm using the right commands but from what I can see it shows the latest version already installed, no?
matthieu@BB-8:~ $ node -v v6.11.2 matthieu@BB-8:~ $ nodejs -v v0.10.29 matthieu@BB-8:~ $ sudo apt install nodejs@latest Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package nodejs@latest matthieu@BB-8:~ $ sudo apt install nodejs Reading package lists... Done Building dependency tree Reading state information... Done nodejs is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Which model of raspberry are you using?

Raspberry Pi 3 model b+
Matthieu Nasri

On 15 Nov 2019, at 18:12, mafyata<EMAIL_ADDRESS>wrote:

Which model of raspberry are you using?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

First delete old nodejs.
After that install new:
curl -sL https://deb.nodesource.com/setup_10.x | bash -
sudo apt-get install -y nodejs

Thank you for your help.
I’ve deleted all NodeJS. The command curl -sL https://deb.nodesource.com/setup_10.x <https://deb.nodesource.com/setup_10.x> | bash - return the following error, I’ve tried using sudo but I get the same…
`sudo curl -sL https://deb.nodesource.com/setup_10.x | bash -
Installing the NodeSource Node.js 10.x repo...
Populating apt-get cache...

apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Error executing command, exiting`

On 15 Nov 2019, at 18:24, mafyata<EMAIL_ADDRESS>wrote:
First delete old nodejs.
After that install new:
curl -sL https://deb.nodesource.com/setup_10.x https://deb.nodesource.com/setup_10.x | bash -
sudo apt-get install -y nodejs
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/nfarina/homebridge/issues/2219?email_source=notifications&email_token=AHEEG2NZTPN55RIWO3DN2PLQT3LN5A5CNFSM4HMLS3FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEGEBFY#issuecomment-554451095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEEG2JH7EJVNJOYSHVJRLDQT3LN5ANCNFSM4HMLS3FA.

Try with su:

sudo su
curl -sL https://deb.nodesource.com/setup_10.x | bash -
sudo apt-get install -y nodejs

Worked with su. I'm stealing having errors...
nodeJS : v10.17.0
[2019-11-15 21:35:28] TypeError: "list" argument must be an Array of Buffers     at Function.Buffer.concat (buffer.js:314:13)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)     at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)     at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)     at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)     at emitNone (events.js:86:13)     at IncomingMessage.emit (events.js:185:7)     at endReadableNT (_stream_readable.js:974:12)     at _combinedTickCallback (internal/process/next_tick.js:80:11) [2019-11-15 21:35:29] TypeError: "list" argument must be an Array of Buffers     at Function.Buffer.concat (buffer.js:314:13)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)     at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)     at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)     at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)     at emitNone (events.js:86:13)     at IncomingMessage.emit (events.js:185:7)     at endReadableNT (_stream_readable.js:974:12)     at _combinedTickCallback (internal/process/next_tick.js:80:11) [2019-11-15 21:35:29] TypeError: "list" argument must be an Array of Buffers     at Function.Buffer.concat (buffer.js:314:13)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)     at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)     at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)     at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)     at emitNone (events.js:86:13)     at IncomingMessage.emit (events.js:185:7)     at endReadableNT (_stream_readable.js:974:12)     at _combinedTickCallback (internal/process/next_tick.js:80:11) [2019-11-15 21:35:29] TypeError: "list" argument must be an Array of Buffers     at Function.Buffer.concat (buffer.js:314:13)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)     at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)     at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)     at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)     at emitNone (events.js:86:13)     at IncomingMessage.emit (events.js:185:7)     at endReadableNT (_stream_readable.js:974:12)     at _combinedTickCallback (internal/process/next_tick.js:80:11) [2019-11-15 21:35:29] Got SIGTERM, shutting down Homebridge... [2019-11-15 21:35:29] TypeError: "list" argument must be an Array of Buffers     at Function.Buffer.concat (buffer.js:314:13)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)     at Object.encode (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)     at HAPServer._handlePairVerifyStepOne (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:543:21)     at HAPServer._handlePairVerify (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:505:10)     at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)     at emitNone (events.js:86:13)     at IncomingMessage.emit (events.js:185:7)     at endReadableNT (_stream_readable.js:974:12)     at _combinedTickCallback (internal/process/next_tick.js:80:11)

Uninstall homebridge and plugins and install them again


Bugfix: sizing of StaticMap in tool settings panels

Fixes several issues with the StaticMap component:

[x] size the image correctly using the width and height props
[x] use the full width of the .block parent container to size the image
[x] correct loading, loaded, and error states
[x] make the image responsive / resize on browser resize
[x] update usage of Static Map in all tool settings panels

Before:

After:

 Bug: Change Location static map sizing & loading indicator


how import js module using npm

i have a question here, i want import a wrapper about protocol buffer,here is this git :https://github.com/dcodeIO/protobuf.js/wiki/Installation,i install it using
npm install protobufjs
/Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/node_modules/protobufjs
,here is the full path, when i require it
var protobuf = require('./node_modules/react-native/node_modules/protobufjs')
but i got below errors, can someone help me?

react-native bundle --entry-file index.ios.js --platform ios --dev true --bundle-output /Users/ronghui/Library/Developer/Xcode/DerivedData/APRNCore_0_15_0-gbizrllfunlwznhbngwepnjazfqm/Build/Products/Debug-iphonesimulator/APRNCore_0_15_0.app/main.jsbundle --assets-dest /Users/ronghui/Library/Developer/Xcode/DerivedData/APRNCore_0_15_0-gbizrllfunlwznhbngwepnjazfqm/Build/Products/Debug-iphonesimulator/APRNCore_0_15_0.app
bundle: Created ReactPackager
uncaught error Error: UnableToResolveError: Unable to resolve module fs from /Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/node_modules/protobufjs/dist/ProtoBuf.js: Invalid directory /Users/node_modules/fs
at /Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/packager/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js:323:15
at tryCallOne (/Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at doNTCallback0 (node.js:419:9)
at process._tickCallback (node.js:348:13)
See logs /var/folders/vl/fm6gkbrx1f5b8_yrnfpkyjv00000gn/T/react-packager.log
at SocketClient._handleMessage (/Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/packager/react-packager/src/SocketInterface/SocketClient.js:131:23)
at BunserBuf. (/Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/packager/react-packager/src/SocketInterface/SocketClient.js:52:42)
at emitOne (events.js:77:13)
at BunserBuf.emit (events.js:169:7)
at BunserBuf.process (/Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/node_modules/bser/index.js:289:10)
at /Users/ronghui/Desktop/ReactNative/APRNCore_0_15_0/node_modules/react-native/node_modules/bser/index.js:244:12
at doNTCallback0 (node.js:419:9)
at process._tickCallback (node.js:348:13)
Command /bin/sh failed with exit code 1

@zrhzhouronghui You're using a module which uses node native modules. It won't work under React Native.

Hey and thanks for reporting this!
There's an awesome place to ask question like this one: StackOverflow. It's the best system for Q&A. Many people from the community hang out there and will be able to see your question, you can vote on answers and mark question as answered etc. This lets us keep a list of bug reports and feature requests on github and especially Product Pains (again, with voting which is really nice).
If you think StackOverflow works for you please consider posting there instead and closing this issue.
I'm posting this here because github issues haven't been working very well for us and because StackOverflow is so much better. Thanks for reading! :)

@zrhzhouronghui You're using a module which uses node native modules. It won't work under React Native.


Possible licence issue with Xceed.Wpf.Toolkit

Because you are using a version > 3.8 of the Xceed.Wpf.Toolkit there could be an issue with the licence.
See this issue where the maintainer does not deny the issue: xceedsoftware/wpftoolkit#1598
At least your distributed version 2.0.38 contains Xceed.Wpf.Toolkit.dll in version <IP_ADDRESS>
Do you have other/additional information on this topic?

Oops - I was not aware of these requirements. I have removed all binary releases and will soon replace the color picker control that was used. I am sorry about this mistake.

Dependency has now been removed.


FCM - Too dificult to work with the response error codes

The FirebaseException seems a bit oversimplified by just wrapping the HttpRequestException and also not aligned with https://firebase.google.com/docs/reference/fcm/rest/v1/ErrorCode
Error code enums should be returned somewhere. What I have to at this point is to look up for status code (e.g. "[503]") in the FirebaseException.Message, which of course doesn't work in the case of UNSPECIFIED_ERROR from ErrorCode documentation.
For starters, maybe you could at least state what to look for at UNSPECIFIED_ERROR type of response. Propagating the error codes is important for exponential backoff implementations.

Closing as a duplicate of #45.
No FCM operation actually returns in UNSPECIFIED_ERROR as far as I know. None of the other Admin SDK implementations handle it explicitly.

Exception thrown: 'FirebaseAdmin.Messaging.FirebaseMessagingException' in System.Private.CoreLib.dll
am getting this issue @hiranya911


Filters for model index page(s)

In GitLab by @jasonpagetas on Jul 9, 2024, 04:02
There should be the ability to filter searches in the devices, software and operating systems tab. This would allow users to filter by things such as device_type or Publisher

marked this issue as related to #96

marked this issue as blocking #96

removed the relation with #96

added 1m of time spent

marked this issue as related to #23

@jasonpagetas, this issue was migrated from gitlab to github. During this migration you were not added as the user whom opened this issue. This message will ensure that you receive further updates on this issue as it progresses.
Further information can be found within #215


buttonLongPressed() not working as expected

Example, in mortals, we should see the display hold Green/Purple between 1.2 sec and 3 sec as a Blink is longPressed. Then switch to the team on the release of the button.
(note: it is possible this could be an issue with buttonDown or buttonReleased as well)

https://github.com/Move38/Blinks-Simulator/blob/6f3da5af5c818d7ea82dc707940ad46a201c3d7f/examples/js/blink.js#L202
I used flag for button events, once user checked the value, the flag get reset, I think that's the reason why. I can make the reset happen on the release event, what do you think? Also what is the 3 secs action? longlongpress? I didn't add that function, I thought it's for programming the blinks.

Update long pressed function, reset flags after button released.


TimeDimension without using MapServer

Hello,
I'm try use the TimeDimension to animate and show images of radar in Brasil, but i'm not have a MapServer. It's possible use the TimeDimension to make that?

Hi @candidobugarin,
you can use TimeDimension to manage an animation of ImageOverlays.
First of all, try to show just one radar image into a leaflet map using ImageOverlay.
Then, you could adapt the code of the example 10, where you will find an implementation of the class L.TimeDimension.Layer.ImageOverlay. Note that you will need to pass a function to getUrlFunction option to specify how to construct each image url depending on time.

Hi,
I use ImageOverlay on the map, this is the page's url:
http://www.alertadecheias.com.br/chuva/bacia.html
But, with your idea, i go animate the imagens.
Thanks
2015-11-10 10:41 GMT-02:00 Biel Frontera<EMAIL_ADDRESS>
Hi @candidobugarin https://github.com/candidobugarin,
you can use TimeDimension to manage an animation of ImageOverlays.
First of all, try to show just one radar image into a leaflet map using
ImageOverlay.
Then, you could adapt the code of the example 10
http://apps.socib.es/Leaflet.TimeDimension/examples/example10.html,
where you will find an implementation of the class
L.TimeDimension.Layer.ImageOverlay. Note that you will need to pass a
function to getUrlFunction option to specify how to construct each image
url depending on time.
—
Reply to this email directly or view it on GitHub
https://github.com/socib/Leaflet.TimeDimension/issues/11#issuecomment-155410126
.


Data Explorer compressing columns horizontally

EdgeDB Version: 2.0+88c1706
OS Version: MacOS 12.0.1

The edgedb ui data explorer doesn't handle a table with lots of columns. It seems to compress each of them horizontally so they all fit on the screen. It would make a lot more sense if the fields were at least the width of the column title. Ideally it would be the width of the data inside it (e.g. a column with title id that has a uuid in would be better suited if you could see the full uuid by default.
Steps to Reproduce:

Create a schema that has more than around 10 columns.
Open in edgedb ui and try to view the record
Everything will be compressed.

Example 1: A normal table

Example 2: An abstract record (or any table with 20/30 fields)

Some expand/collapse functionality on the vertical bars that separate the fields would be nice too. A click or double-click on a vertical bar  would make the column expand to fit or collapse. Perhaps "expand all" and "collapse all" buttons as well somewhere above the column headers.


Unresolvable JSON pointer in nested definition

Hi,
I am trying to convert dataclass to JSON Schema to be able to use api.model() in flask-restx app. I have a problem with nested objects.
@dataclass
class A(JsonSchemaMixin):
    text: str
    number: int

@dataclass
class B(JsonSchemaMixin):
    test: A

test_model = api.schema_model('B', B.json_schema())

When I try to send:
{
"test": {
          "text": "test",
          "number": 1
         }
}

It gives me an error
jsonschema.exceptions.RefResolutionError: Unresolvable JSON pointer: 'definitions/A' // Werkzeug Debugger
It works when I send something different than object containing "test", but not for nested object. How can I make it work?

I partially solve my problem using this solution
import jsonref
import copy
from dataclasses_jsonschema import JsonSchemaMixin
from dataclasses import dataclass
from dataclasses_json import dataclass_json

@dataclass_json
@dataclass
class A(JsonSchemaMixin):
    text: str
    number: int

@dataclass_json
@dataclass
class B(JsonSchemaMixin):
    test: A

jsonref_schema = jsonref.loads(json.dumps(B.json_schema()))
test_model = api.schema_model('Test model', copy.deepcopy(jsonref_schema))

The problem is when I try to change class B to:
class B(JsonSchemaMixin):
    test: A = A()

Then I gets error:
def encoder(_, v, o): return v.to_dict(omit_none=o, validate=False)
TypeError: to_dict() got an unexpected keyword argument 'omit_none'

I'd need a more complete repro to understand what the issue is here. I don't really know what api.schema_model is doing.

I'd need a more complete repro to understand what the issue is here. I don't really know what api.schema_model is doing.

I am using Flask restx library for hosting my rest api app. There is a possibility to use dataclass schema for validation. Here you can find documentation. api.schema_model is used for validation purpose and creating model for swagger UI. You can find simple restx app that I created here. Then by running python app.py you get the access to local host where rest api and swagger UI is running. The problem is that not every dataclass definiton are valid for JsonSchemaMixin.

I am using Flask restx library for hosting my rest api app. There is a possibility to use dataclass schema for validation. Here you can find documentation. api.schema_model is used for validation purpose and creating model for swagger UI. You can find simple restx app that I created here. Then by running python app.py you get the access to local host where rest api and swagger UI is running. The problem is that not every dataclass definiton are valid for JsonSchemaMixin.


Email verification optional

This is  a bug | feature request.

Prerequisites

[ ] Are you running the latest version?
[ ] Are you reporting to the correct repository?
(enso is made of many specialized packages: https://github.com/familytree365)
[ ] Did you check the documentation?
[ ] Did you perform a cursory search?

Description

Steps to Reproduce

Expected behavior

Actual behavior

Make email verification optional so that it can be turned off.


Bugfix: use DeallocBlockExecutor to notify MTKObserver to detach when target is deallocing

since MTKObserver is element of a array which is a association object of target, MTKObserver's dealloc will delay to call until next runloop after target is dealloced. So I use deallocBlockExecutor as a helper to notify the related MTKObservers to detach ASAP.

This look interesting and it works for that simple example. I tried running some of my apps that use Block-KVO using your implementation and for some objects it just doesn’t work.

The problem is with observing nested keypaths, for example in my case self.tableView.contentOffset. The KVO internally observes the UITableView for contentOffset. When self (a VC) deallocates, it first clears all properties and then associated objects. This causes the table view to deallocate before the observation is removed.
This will need swizzling…


Usb Thermal Printers

How to connect a thermal Printer with USB cable with my android device.  which mode should i use? Is it possible with this library. Because as far as i have seen that this library support bluetooth and network connection. Guide me please

Unfortunately this library is not currently supporting usb connection, but the effort should be minimal, feel free to contribute!


Dearbitrary

Resolves #44.
I would greatly appreciate feedback on naming the structs & associated methods with UnstructuredBuilder.

dearbitrary intentionally builds Unstructured in reverse to counter the problems encountered in #94 (the slice length optimizations) by ensuring that size is built in reverse.
kani is used to fastly assure primitive dearbitary/rearbitrary cases. I am still proof-checking the other primitives and will write fuzzing tests for the non-verifiable implementations.

Todo:

[ ] Write rest of kani proofs
[ ] Set up fuzzing on non-verifiable methods (or takes too long)
[x] UnstructuredBuilder Documentation
[ ] Dearbitrary Documentation
[ ] Decomment u16 range test - currently takes 10 minutes to verify, so I've commented it for the time being to save on my testing time.
[ ] Derive macro

Notes:

Should dearbitrary be hidden behind a feature?
Int is currently a breaking API change. Can this be fixed without manually implementing from/to le bytes?
While writing this, I noticed that the f32/f64 representation isn't representable cross-platform if MIPS is used as the architecture set.

Apologies for how long its taken me to respond to this PR.
I'm concerned about the complexity that this feature brings. I'm not convinced that it is worth it, just to be able to seed a corpus.
If seeding a corpus is an important use case, it can be done today by changing how the structure-aware fuzzing is done from a generative paradigm to a mutation paradigm:

take bytes as the input to the fuzz target

try to deserialize the bytes into your input type with bincode::deserialize::<MyInputType>(fuzzer_input) or similar (protobuf, etc...)

if the deserialization fails, continue to the next test case

if it succeeds, then run the structured input through your oracles, same as you otherwise would with the arbitrary crate

additionally define a fuzz_mutator! that does something like
let mut input = bincode::deserialize::<MyInputType>(input_bytes)
    .unwrap_or_else(|| MyInputType::default());

// Mutate a test case. Not any more difficult to implement
// than a by-hand `Arbitrary` implementation.
input.mutate(seed);

return bincode::serialize(input);

now you can seed your corpus by manually building a bunch of MyInputTypes and then bincode::serialize them into the corpus directory

(But backing up: It should also be noted that randomly generating a corpus before you start fuzzing isn't going to be expected to do any better than incrementally building the corpus from nothing. Seeding the corpus is only useful if you already have inputs that you know are interesting for other reasons, for example they've triggered bugs/crashes before or are Real World snippets of your programming language or etc...)

In general, the mutation paradigm has another benefit over the generative paradigm as well: if you add knobs to only do shrinking/simplifying mutations, then it is trivial to build a test case minimizer on top of that which performs better than cargo fuzz tmin. And for things like programming languages, if you add a semantics-preserving mutation mode, then you can do differential fuzzing where you check the correctness of your various compiler passes and optimizations like
let input = the_fuzzer_input();
let result = run(&input);

let alt_input = input.mutate_preserving_semantics();
let alt_result = run(&alt_input);

assert_eq!(
    result,
    alt_result,
    "running two semantically-equivalent programs should produce the same results",
);

(we should probably have a crate that is the mutation-paradigm-equivalent of the arbitrary crate in the rust-fuzz org)

By the way, my use of seeding was incorrect. I meant more for large arbitrary-derived structures, as developing an initial corpus is painstaking. Still, without it, the initial fuzzing warmup takes longer. However, the inconvenience also means that some libraries choose to go without a corpus for those types of structures.
While I do have a limited understanding of fuzzers, aren't most fuzzers mutative instead of generative already? Wouldn't methods like mutate or mutate_preserving_semantics have to explore much more slowly given that their inputs are dependent on the structure of input?


Fix user bug

It should be the current_users elevated status that is checked
not the user being edited

Can one of the admins verify this patch?


Validator field for the variable type

Feature Request 🛍

Currently, the JSON schema that is generated by parsing a template does not contain any validator field for a particular variable. It would be really handy there is a validator key in the JSON object
Current object:
children:[...],
data:{
    elementType: 'element type'
    name: 'field name'
}

Requested :
children:[...],
data:{
    elementType: 'element type'
    name: 'field name'
    validator:{}
}

Use Case

This would ensure the entering of bad data in the variable field in certain circumstances

The Concerto -> JSON Schema conversion does include regex and number bounds validation information. I'm not sure I understand the examples above, which don't appear to be JSON Schema.

@dselman
I think I was a bit unclear.
I am adding an image for the reference

Here we see that the type is variable
This particular JSON object we get in the slateValue(present in web-components) which I assume is done when we parse a template and then draft a clause for the template.
Now when we parse a variable that variable comes from a model. If a model field has some validator like:
asset Model{
o String field regex=<any regex expression>/
}

then I want that validator field to be present as a key in the data element. I wonder if this can be made possible

That's an interesting question. I'm unsure if anything needs to change in Concerto itself, possibly this is more of an issue for the markdown-transform. Also if we want other information passed to Slate, we will need to update the CiceroMark model here: https://github.com/accordproject/models/blob/master/src/markdown/ciceromark%400.3.1.cto


Adv should be in eps neighbourhood of Clean Image

According to paper(section 2.2 Basic Iterative Method) :https://arxiv.org/pdf/1607.02533.pdf ,
the Adv example must always lie in the Eps-neighbourhood of the original Clean Image. But the implementation(I saw the pytorch one) in projected_gradient_method for nth iteration clips only the eta and applies it to (n-1)th adv and no steps are taken to ensure the adv example lied in the eps neighbourhood of clean image. Did I misunderstand or is it a wrong implementation ?

For the PyTorch version of projected_gradient_descent, I think the "projection" step is taken care of either in clip_eta or inside fast_gradient_method (in the optimize_linear method, to be specific).
These methods all make sure that the eta we are adding to x has some norm (specified by the user) less than or equal to eps, which is the same as saying that the perturbed example is within the eps neighborhood of the original.
Thanks.

Thank you for your clarification @michaelshiyu

No problem @saswatpp