Electron 14+ required? Potential systemd 249 / nVidia issue

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.60.0
OS Version: Fedora Kinoite 35

Steps to Reproduce

install vscode from rpm using rpmostree
run vscode - the application starts to draw the window and then crashes.

more information, including system information and example runs follow...
Suspected issue
There seems to be an incompatibility between systemd 249 and chrome <93 / electron <14.0 when paired with hosts using nvidia GPUs and the nVidia drivers. The problem doesn't seem to exist when using the nouveau drivers and I don't have the hardware to test on AMD and Intel GPUs readily. The error messages seem to follow a problem that existed in Chrome until Chrome 93 was released (an error with very similar error messages logged).
Related chrome information:

https://bugzilla.redhat.com/show_bug.cgi?id=1973461
https://bugs.chromium.org/p/chromium/issues/detail?id=1221442
https://ubuntu.forumming.com/question/12510/chrome-is-not-starting-in-ubuntu-20-04-error-sandbox-linux-cc-374-initializesandbox-called-with-multiple-threads-in-process-gpu-process

Suggested investigation / work to fix
Upgrade electron to >=14.0
Testing/Problem output
System information
[root@hostname ~]$inxi -b
System:    Host: toolbox Kernel: 5.14.0-60.fc35.x86_64 x86_64 bits: 64 Console: tty pts/0 Distro: Fedora release 35 (Rawhide)
Machine:   Type: Desktop Mobo: ASUSTeK model: ROG CROSSHAIR VIII DARK HERO v: Rev X.0x serial:<PHONE_NUMBER>00039
           UEFI: American Megatrends v: 0210 date: 10/13/2020
CPU:       Info: 12-Core AMD Ryzen 9 5900X [MT MCP] speed: 2420 MHz min/max: 2200/3700 MHz
Graphics:  Device-1: NVIDIA TU106 [GeForce RTX 2070 Rev. A] driver: nvidia v: 470.63.01
           Device-2: Logitech BRIO Ultra HD Webcam type: USB driver: hid-generic,snd-usb-audio,usbhid,uvcvideo
           Display: server: No display server data found. Headless machine?
           Message: Unable to show advanced data. Required tool glxinfo missing.
Network:   Device-1: Realtek RTL8125 2.5GbE driver: r8169
           Device-2: Intel I211 Gigabit Network driver: igb
           Device-3: Intel Wi-Fi 6 AX200 driver: iwlwifi
           Device-4: Microsoft Xbox 360 Wireless Adapter type: USB driver: xpad
Drives:    Local Storage: total: 3.18 TiB used: 16.65 GiB (0.5%)
Info:      Processes: 496 Uptime: 4h 53m Memory: 62.7 GiB used: 4.42 GiB (7.0%) Shell: Bash inxi: 3.3.06

Attempt to launch verbosely
[username@hostname ~]$ code --verbose
[main 2021-09-08T03:56:48.928Z] Starting VS Code
[main 2021-09-08T03:56:48.929Z] from: /usr/share/code/resources/app
[main 2021-09-08T03:56:48.929Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'skip-welcome': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-workspace-trust': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': 'b8b40d61-b865-4432-acaf-ddef8c5637c8',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  'no-sandbox': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: '/home/username/.config/Code/logs/20210908T155648'
}
[main 2021-09-08T03:56:48.930Z] Resolving machine identifier...
[main 2021-09-08T03:56:48.930Z] Resolved machine identifier: 3548bd88a3b7c2295beeb8b4cc8f1c279de2cb73db6520abd67a70c942386fcb
[main 2021-09-08T03:56:48.931Z] Main->SharedProcess#connect
[main 2021-09-08T03:56:48.940Z] StorageMainService: creating global storage
[main 2021-09-08T03:56:48.941Z] lifecycle (main): phase changed (value: 2)
[main 2021-09-08T03:56:48.941Z] windowsManager#open
[main 2021-09-08T03:56:48.941Z] windowsManager#open pathsToOpen [
  {
    backupPath: '/home/username/.config/Code/Backups/1627648141969',
    remoteAuthority: undefined
  }
]
[main 2021-09-08T03:56:48.942Z] IPC Object URL: Registered new channel vscode:f814d4b5-4288-49a8-ab56-46d06020b0f6.
[main 2021-09-08T03:56:48.943Z] window#validateWindowState: validating window state on 1 display(s) { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[main 2021-09-08T03:56:48.943Z] window#validateWindowState: 1 monitor working area { x: 0, y: 44, width: 3840, height: 1556 }
[main 2021-09-08T03:56:48.943Z] window#ctor: using window state { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[main 2021-09-08T03:56:48.978Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 0, emptyToRestore: 1, emptyToOpen: 0)
[main 2021-09-08T03:56:48.979Z] lifecycle (main): phase changed (value: 3)
[main 2021-09-08T03:56:48.980Z] update#setState idle
[main 2021-09-08T03:56:48.980Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[116374:0908/155649.100031:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.100052:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 1 time(s)
[116374:0908/155649.312438:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.312450:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 2 time(s)
[116374:0908/155649.521488:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.521501:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 3 time(s)
[116472:0908/155649.531970:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116472:0908/155649.532032:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116374:0908/155649.626429:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.626443:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 4 time(s)
[116480:0908/155649.632417:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116480:0908/155649.632469:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116374:0908/155649.731986:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.732006:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 5 time(s)
[116490:0908/155649.737919:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116490:0908/155649.737974:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116374:0908/155649.831934:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.831950:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 6 time(s)
[116500:0908/155649.834163:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116500:0908/155649.834224:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116374:0908/155649.922634:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.922643:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 7 time(s)
[116510:0908/155649.924806:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116510:0908/155649.924854:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116374:0908/155650.011715:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155650.011723:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 8 time(s)
[116520:0908/155650.014779:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116520:0908/155650.014896:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116374:0908/155650.103789:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155650.103804:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 9 time(s)
[116374:0908/155650.103816:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
/dev/fd/3: No such file or directory
Server response:
/dev/fd/3: No such file or directory
Server response:

Attempt to launch verbosely, whilst disabling GPU
[username@hostname ~]$ code --verbose --disable-gpu
[116598:0908/155657.630767:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116598:0908/155657.630832:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[main 2021-09-08T03:56:57.687Z] Starting VS Code
[main 2021-09-08T03:56:57.688Z] from: /usr/share/code/resources/app
[main 2021-09-08T03:56:57.688Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': true,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'skip-welcome': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-workspace-trust': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': 'b8b40d61-b865-4432-acaf-ddef8c5637c8',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  'no-sandbox': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: '/home/username/.config/Code/logs/20210908T155657'
}
[main 2021-09-08T03:56:57.689Z] Resolving machine identifier...
[main 2021-09-08T03:56:57.689Z] Resolved machine identifier: 3548bd88a3b7c2295beeb8b4cc8f1c279de2cb73db6520abd67a70c942386fcb
[main 2021-09-08T03:56:57.689Z] Main->SharedProcess#connect
[main 2021-09-08T03:56:57.699Z] StorageMainService: creating global storage
[main 2021-09-08T03:56:57.700Z] lifecycle (main): phase changed (value: 2)
[main 2021-09-08T03:56:57.700Z] windowsManager#open
[main 2021-09-08T03:56:57.700Z] windowsManager#open pathsToOpen [
  {
    backupPath: '/home/username/.config/Code/Backups/1627648141969',
    remoteAuthority: undefined
  }
]
[main 2021-09-08T03:56:57.701Z] IPC Object URL: Registered new channel vscode:8712f783-8fd0-43b6-ba00-e8a113a35665.
[main 2021-09-08T03:56:57.701Z] window#validateWindowState: validating window state on 1 display(s) { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[main 2021-09-08T03:56:57.702Z] window#validateWindowState: 1 monitor working area { x: 0, y: 44, width: 3840, height: 1556 }
[main 2021-09-08T03:56:57.702Z] window#ctor: using window state { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[116562:0908/155657.730926:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155657.730937:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 1 time(s)
[main 2021-09-08T03:56:57.762Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 0, emptyToRestore: 1, emptyToOpen: 0)
[main 2021-09-08T03:56:57.763Z] lifecycle (main): phase changed (value: 3)
[main 2021-09-08T03:56:57.763Z] update#setState idle
[main 2021-09-08T03:56:57.763Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[116623:0908/155657.783572:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116623:0908/155657.783656:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[main 2021-09-08T03:56:57.817Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[116562:0908/155657.884513:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155657.884530:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 2 time(s)
[116648:0908/155657.936418:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116648:0908/155657.936516:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116562:0908/155658.037659:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.037670:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 3 time(s)
[116661:0908/155658.040566:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116661:0908/155658.040626:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116562:0908/155658.127869:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.127885:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 4 time(s)
[116669:0908/155658.130209:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116669:0908/155658.130261:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116562:0908/155658.219955:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.219968:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 5 time(s)
[116681:0908/155658.222267:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116681:0908/155658.222328:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116562:0908/155658.312844:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.312859:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 6 time(s)
[116562:0908/155658.312869:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
/dev/fd/3: No such file or directory
Server response:
/dev/fd/3: No such file or directory
Server response:

Thanks for the detailed report and linking the upstream issue, the fix looks simple enough to backport to older lines, I will update the fix for Electron 13. It is going to be while before we adopt Electron 14 as it depends on https://github.com/microsoft/vscode/issues/132282 and https://github.com/microsoft/vscode/issues/123592

Backported at https://github.com/electron/electron/pull/30893

This issue still persists on the latest insiders. How do we workaround this until a fresh isniders release can be put out?

As a workaround I put code-insiders (and also azure data studio) on my PATH, and am launchign them from the terminal passing in --no-sandbox.

The latest insiders build still fails to launch without --no-sandbox. Ubuntu 21.10 is using systemd 248 (no teven 249) and will be in GA in the first week of October.

@borgdylan can you open a separate issue for the behavior you are facing, it will be easier to collect the relevant logs and identify the issue. From what you have described it seems unrelated to this issue. Thanks for understanding!

@deepak1556 I opened https://github.com/microsoft/vscode/issues/133593

Marking as verified since it works with --no-sandbox, barring the new issue


Request url for book with number

On top of '1 chronicles' and '2 chronicles' as input, may be can consider to add 'first chronicles' and 'second chronicles'. Also for the rest of the multiple books. Thanks :)

I also have a use case for this - although i can easily work around it, so it's not necessary.
https://github.com/meichthys/sword_drill/issues/5

On top of '1 chronicles' and '2 chronicles' as input, may be can consider to add 'first chronicles' and 'second chronicles'. Also for the rest of the multiple books. Thanks :)

I would recommend processing your input before making the request. You're reducing complexity for @seven1m, alleviating processing on the API/server, reducing overhead during transport and it isn't as costly to process it on your input. I had a similar use case and decided to address it with an array of all the books and included possible variations (i.e. array is greater than the 66 books). The added benefit is you can also handle future (language) translations should you take on the enhancement.


Private project: support criteria and dependencies

Find solution for criteria and dependencies for private project

Keep score calculations untouched
Hide deps and criteria goals if they're not visible to current user
If there are hidden goals - add a message that some goals are hidden currently


Lighten support

Good evening guys,
Is there any plan to include the lighten() functionality? Maybe any workaround to make it happen?

Is this part of the css spec now?

I'm not sure it is. I know it from SASS.

I just found I can use l(+5%) to accomplish the same functionality. This is what I was looking for...


Fix typo in models.md

Change Summary

This fixes a typo in the descriptions of Error Handling in models.md.
Related issue number

Checklist

[ ] Unit tests for the changes exist
[ ] Tests pass on CI and coverage remains at 100%
[ ] Documentation reflects the changes where applicable
[ ] changes/<pull request or issue id>-<github username>.md file added describing change
(see changes/README.md for details)
[x] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

please review


WIP: Add workaround to fix set_focus() failure on UIA (call win32 in this case)

Sometimes set_focus() on UIA backend failed without any exceptions (for example, on Wireshark)

@vasily-v-ryabov, I just discovered that condition https://github.com/pywinauto/pywinauto/blob/1aecf7347603af74a4fb4d07a01d7ab7debb9091/pywinauto/controls/uiawrapper.py#L412
can be true if the set_focus worked fine. For example, in script
app = Application(backend="uia").connect(path=r"notepad.exe")
win = app.window(best_match='UntitledNotepad')
win.set_focus()

SetFocus() from UIA works (the window becomes foreground), but it still switches to win32 backend.
The reason for this is that children widget grabs focus automatically:
self.element_info returns uia_element_info.UIAElementInfo - 'Untitled - Notepad', Notepad and
UIAElementInfo.get_active() returns uia_element_info.UIAElementInfo - '', Edit.
I tried to fix it with the following code, but it doesn't work for Wireshark:
if self.element_info.element.SetFocus() != S_OK:

There is method top_level_parent() in BaseWrapper. I think we can move it to base class ElementInfo (to avoid duplication in all backends) so that .top_level_parent property uses backend-specific .parent property. The mentioned condition would look like if self.element_info != UIAElementInfo.get_active() and self.element_info != UIAElementInfo.get_active().top_level_parent: Maybe you need to save UIAElementInfo.get_active() result to a variable so it's not called twice.


Make Orienteer-Tauchart to use webjars instead of direct CDN resources

Fixed here: https://github.com/OrienteerBAP/Orienteer/commit/9fe385cce6f3db14d50681b2c9e1bc4a8df967e3


[onnx] Add dependency protobuf

Fixes https://github.com/microsoft/vcpkg/issues/37456

[X] Changes comply with the maintainer guide.
[ ] SHA512s are updated for each updated download.
[ ] The "supports" clause reflects platforms that may be fixed by this new version.
[ ] Any fixed CI baseline entries are removed from that file.
[ ] Any patches that are no longer applied are deleted from the port's directory.
[X] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[X] Only one version is added to each modified port's versions file.

Usage test pass with following triplets:
x64-windows
x64-windows-static

Thanks for the fix!


(PUP-9357) Redact check if sensitive

If the check parameter is marked sensitive, redact it from the debug message.
This changes the provider exec.run() command's interface, which may be inherited by other code.

This is changing
def run(command, check = false)

to
def run(command, check = nil)

so we can pass in the symbol for a check, e.g.
provider.run(value, :onlyif)

However, this may be too large a change for the benefit it provides, and we may change this to
def run(command, check = false, checkname = nil)

so as not to interfere with other derived provider implementations.

CLA signed by all contributors.

After some discussion, decided to mark all of :command, :onlyif, and :unless sensitive if any are sensitive.

@kris-bosland changes look good. Could you update the PR description to match the current behavior (as we ended up not changing the exec interface)?

OK, updated first comment and removed obsolete follow on comment so as not to confuse anyone.


vertx-circuit-breaker java CircuitBreaker interface has breaking change 3.8.1 > 3.8.2

The method signature from of the io.vertx.reactivex.circuitbreaker.CircuitBreaker execute method changed from
public  io.vertx.reactivex.core.Future execute(Handler<io.vertx.reactivex.core.Promise> command)
to
public  void execute(Handler<io.vertx.reactivex.core.Promise> command, Handler<AsyncResult> handler)
But the 3.8.2 breaking changes list https://github.com/vert-x3/wiki/wiki/3.8.2-Deprecations-and-breaking-changes does not show it and the documentation also describe the original interface:
https://vertx.io/docs/vertx-circuit-breaker/java/
Can you please make it consistent. Thanks.

the method:
  <T> Future<T> execute(Handler<Promise<T>> command);

still exist in 3.8.2

Are you sure that io.vertx.reactivex.circuitbreaker.CircuitBreaker has a method with  <T> Future<T> execute(Handler<Promise<T>> command)? The version I can download has only public <T> void execute(Handler<io.vertx.reactivex.core.Promise<T>> command, Handler<AsyncResult<T>> handler)

But I see what you mean. The doc describes the non reactive version. Unfortunately the reactive version had a breaking change that is not in the breaking changes list :)

oh right indeed, this is because we need to use @GenIgnore to ignore the method and thus there is no RX generation. I'll update the wiki page thanks.


Changed x axis and nav height so labels aren't clipped.

#563.

Looks good, cheers @jdhodges431 :+1:


user account hard coded!

watch out! your account is hard coded inside def place_order
https://api.robinhood.com/accounts/5PY93481/
you should probably call the "accounts" endpoint, and extract "url" from the first account

@sircambridge Thanks, I'll look into this and create a fix.

Duuuuuuuude this is insanely bad haha - are people not screwing around with your account left and right? If I were you I would close your RobinHood account ASAP.

Also, this project is 100% useless without that string. How did you find out your account ID?

@ialexryan
"Duuuuuuuude this is really bad haha - are people not screwing around with your account left and right?
Unlikely. It's possible that this is causing problems with you executing trades but very unlikely that this is a security vuln. I'll take a look later.
"Also, this project is pretty much useless without that string. "
Ok. I'll late a look. If you have ideas file a PR.

I spent some time inspecting Robinhood app traffic with Charles and wasn't able to get anywhere. Looks like the Robinhood app is pretty strict about SSL certificates, and it refused to log in or do anything while proxying was active.
How did you get your user ID originally? Is this a change in their security practices (for the better, but unfortunate for us) in the last few months?


FORCE_REDOWNLOAD raises "Directory not empty" exception on second run

Describe the bug
Running load_dataset(..., download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD) twice raises a Directory not empty exception on the second run.
Steps to reproduce the bug
I cannot test this on datasets v2.11.0 due to #5711, but this happens in v2.10.1.

Set up a script my_dataset.py to generate and load an offline dataset.
Load it with        ds = datasets.load_dataset(path=/path/to/my_dataset.py,
                                   name='toy',
                                   data_dir=/path/to/my_dataset.py,
                                   cache_dir=cache_dir,
                                   download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD,
                                   )

It loads fineDataset my_dataset downloaded and prepared to /path/to/cache/toy-..e05e/1.0.0/...5b4c. Subsequent calls will reuse this data.

Try to load it again with the same snippet and the splits are generated, but at the end of the loading process it raises the error2023-04-11 12:10:19,965: DEBUG:	open file: /path/to/cache/toy-..e05e/1.0.0/...5b4c.incomplete/dataset_info.json
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/path/to/conda/environment/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset
    builder_instance.download_and_prepare(
  File "/path/to/conda/environment/lib/python3.10/site-packages/datasets/builder.py", line 852, in download_and_prepare
    with incomplete_dir(self._output_dir) as tmp_output_dir:
  File "/path/to/conda/environment/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/path/to/conda/environment/lib/python3.10/site-packages/datasets/builder.py", line 826, in incomplete_dir
    shutil.rmtree(dirname)
  File "/path/to/conda/environment/lib/python3.10/shutil.py", line 730, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/path/to/conda/environment/lib/python3.10/shutil.py", line 728, in rmtree
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/path/to/cache/toy-..e05e/1.0.0/...5b4c'

Expected behavior
Regenerate the dataset from scratch and reload it.
Environment info

datasets version: 2.10.1
Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28
Python version: 3.10.8
PyArrow version: 11.0.0
Pandas version: 1.5.2

Hi ! I couldn't reproduce your issue :/
It seems that shutil.rmtree failed. It is supposed to work even if the directory is not empty, but you still end up with OSError: [Errno 39] Directory not empty:. Can you make sure another process is not using this directory at the same time ?

I have the same error with datasets==2.14.5 and pyarrow==13.0.0. Python 3.10.13

I have same error. Any workaround?


Upgrading to 2.0.0 causes server RuntimeConfig variables to be type "unknown"

Nuxt version: 3.13.2
Nuxt-security version: 1.4.3
I'm not sure if this is a bug or it's just an issue with my config, so I'll just ask it as a question.
But basically I'm trying to upgrade our Nuxt-security module from 1.4.3 --> 2.0.0. But I'm getting type errors where RuntimeConfig variables are being cast as type unknown, but they are expected to be type string.
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.

This is only seems to be the case though for files in our app server/api folders. RuntimeConfig variables used outside of the server/apis folders don't seem to throw this error. I tried deleting the server folder and then running again with the upgrade and it seems the errors disappear.
Also on Nuxt-security version 1.4.3, then these errors don't occur. Only when I upgrade to 2.0.0.
Could it be related to this? https://github.com/Baroshem/nuxt-security/issues/319
Thank you in advance.

Bump

Hi @liamb0t
Could you provide a minimal repro?

@vejja
I could not make a minimal reproduction of the error unfortunately . Is there anything else I could do?

Would you be able to share your nuxt.config.ts and your tsconfig.json ?

Shared nuxt.config.ts
import { hrtime } from 'node:process'
const isDev = process.env.NODE_ENV === 'development'

export default defineNuxtConfig({
  app: {
    head: {
      viewport: 'width=device-width, initial-scale=1, viewport-fit=cover'
    }
  },
  modules: [
    '@nuxt/devtools',
    'nuxt-directus',
    '@pinia/nuxt',
    '@vueuse/nuxt',
    'nuxt-security',
    '@nuxtjs/tailwindcss',
    '@nuxt/test-utils/module',
    '@nuxtjs/device'
  ],
  build: {
    transpile: [
      '@fortawesome/vue-fontawesome'
    ]
  },
  security: {
    headers: {
      crossOriginEmbedderPolicy: isDev ? 'unsafe-none' : 'credentialless',
      contentSecurityPolicy: {
        'img-src': ['\'self\'', 'data:', 'https://website.com'],
        // allow embedding on website.com
        'frame-ancestors': ['\'self\'', 'https://website.com']
      },
      // Mabpox API URL restriction needs to now the referrer
      referrerPolicy: 'no-referrer-when-downgrade',
      permissionsPolicy: {
        geolocation: ['*']
      }
    }
  },
  runtimeConfig: {
    public: {
      MAPBOX_ACCESS_TOKEN: process.env.MAPBOX_ACCESS_TOKEN,
      GOOGLE_TILES_API_KEY: process.env.GOOGLE_TILES_API_KEY,
      CMS_GOOGLE_OAUTH_CLIENT_ID: process.env.CMS_GOOGLE_OAUTH_CLIENT_ID,
      VERCEL_ENV: process.env.VERCEL_ENV,
      BUILD_TIME: hrtime.bigint().toString()
    }
  },
  directus: {
    url: 'https://website.directus.app/'
  },
  devtools: {
    enabled: isDev,

    timeline: {
      enabled: true
    }
  },
  css: [
<EMAIL_ADDRESS>    'mapbox-gl/dist/mapbox-gl.css'
  ],
  typescript: {
    typeCheck: isDev ? true : false
  },
  vue: {
    compilerOptions: {
      isCustomElement: tag =>
        ['model-viewer', 'dotlottie-player', 'gmp-map-3d'].includes(tag)
    }
  }
})

App nuxt.config.ts
export default defineNuxtConfig({
  telemetry: false,
  extends: [
    '../../packages/shared',
    '../../packages/ui-lib'
  ],
  routeRules: {
    '**/editor/**': {
      security: {
        headers: {
          contentSecurityPolicy: {
            'script-src': ['\'wasm-unsafe-eval\'', '\'self\'', 'https:', '\'unsafe-inline\'', '\'strict-dynamic\'', '\'nonce-{{nonce}}\'']
          }
        }
      }
    }
  },
  runtimeConfig: {
    DIRECTUS_API_TOKEN: process.env.DIRECTUS_API_TOKEN || '',
    public: {
      VERCEL_ANALYTICS_API_KEY: process.env.VERCEL_ANALYTICS_API_KEY,
      VERCEL_PROJECT_ID: process.env.VERCEL_PROJECT_ID,
      VERCEL_TEAM_ID: process.env.VERCEL_TEAM_ID,
      EDITOR_WEBSOCKET_TOKEN: process.env.EDITOR_WEBSOCKET_TOKEN
    }
  },
  directus: {
    autoRefresh: true
  },
  typescript: {
    tsConfig: {
      exclude: [
        '../public/Cesium/**/*'
      ]
    }
  },
  nitro: {
    routeRules: {
      '/api/analytics/**': { proxy: { to: 'https://vercel.com/api/**' } }
    }
  },
  vite: {
    define: {
      CESIUM_BASE_URL: JSON.stringify('/Cesium')
    },
    server: {
      proxy: {
        '/api/runtime-editor': {
          target: 'https://cms.website.dev',
          changeOrigin: true
        }
      }
    }
  }
})

App tsconfig.json
// Generated by nuxi
{
  "compilerOptions": {
    "paths": {
      "nitropack": [
        "../../../node_modules/nitropack"
      ],
      "defu": [
        "../../../node_modules/defu"
      ],
      "h3": [
        "../../../node_modules/h3"
      ],
      "consola": [
        "../../../node_modules/consola"
      ],
      "ofetch": [
        "../../../node_modules/ofetch"
      ],
      "@unhead/vue": [
        "../../../node_modules/@unhead/vue"
      ],
      "@nuxt/devtools": [
        "../../../node_modules/@nuxt/devtools"
      ],
      "vue": [
        "../../../node_modules/vue"
      ],
      "@vue/runtime-core": [
        "../../../node_modules/@vue/runtime-core"
      ],
      "@vue/compiler-sfc": [
        "../../../node_modules/@vue/compiler-sfc"
      ],
      "vue-router": [
        "../../../node_modules/vue-router"
      ],
      "vue-router/auto-routes": [
        "../../../node_modules/vue-router/vue-router-auto-routes"
      ],
      "unplugin-vue-router/client": [
        "../../../node_modules/unplugin-vue-router/client"
      ],
      "@nuxt/schema": [
        "../../../node_modules/@nuxt/schema"
      ],
      "nuxt": [
        "../../../node_modules/nuxt"
      ],
      "~": [
        ".."
      ],
      "~/*": [
        "../*"
      ],
      "@": [
        ".."
      ],
      "@/*": [
        "../*"
      ],
      "~~": [
        ".."
      ],
      "~~/*": [
        "../*"
      ],
      "@@": [
        ".."
      ],
      "@@/*": [
        "../*"
      ],
      "assets": [
        "../assets"
      ],
      "assets/*": [
        "../assets/*"
      ],
      "public": [
        "../public"
      ],
      "public/*": [
        "../public/*"
      ],
      "#app": [
        "../../../node_modules/nuxt/dist/app"
      ],
      "#app/*": [
        "../../../node_modules/nuxt/dist/app/*"
      ],
      "vue-demi": [
        "../../../node_modules/nuxt/dist/app/compat/vue-demi"
      ],
      "pinia": [
        "../../../node_modules/pinia/dist/pinia"
      ],
      "#vue-router": [
        "../../../node_modules/vue-router"
      ],
      "#imports": [
        "./imports"
      ],
      "#app-manifest": [
        "./manifest/meta/dev.json"
      ],
      "#build": [
        "."
      ],
      "#build/*": [
        "./*"
      ],
      "#components": [
        "./components"
      ]
    },
    "esModuleInterop": true,
    "skipLibCheck": true,
    "target": "ESNext",
    "allowJs": true,
    "resolveJsonModule": true,
    "moduleDetection": "force",
    "isolatedModules": true,
    "verbatimModuleSyntax": true,
    "strict": true,
    "noUncheckedIndexedAccess": false,
    "forceConsistentCasingInFileNames": true,
    "noImplicitOverride": true,
    "module": "preserve",
    "noEmit": true,
    "lib": [
      "ESNext",
      "dom",
      "dom.iterable",
      "webworker"
    ],
    "jsx": "preserve",
    "jsxImportSource": "vue",
    "types": [],
    "moduleResolution": "Bundler",
    "useDefineForClassFields": true,
    "noImplicitThis": true,
    "allowSyntheticDefaultImports": true
  },
  "include": [
    "./nuxt.d.ts",
    "../.config/nuxt.*",
    "../**/*",
    "../../../packages/shared/**/*",
    "../../../packages/ui-lib/**/*",
    "../../../node_modules/@nuxt/devtools/runtime",
    "../../../node_modules/@nuxt/devtools/dist/runtime",
    "../../../node_modules/nuxt-directus/runtime",
    "../../../node_modules/nuxt-directus/dist/runtime",
    "../../../node_modules/@pinia/nuxt/runtime",
    "../../../node_modules/@pinia/nuxt/dist/runtime",
    "../../../node_modules/@vueuse/nuxt/runtime",
    "../../../node_modules/@vueuse/nuxt/dist/runtime",
    "../../../node_modules/nuxt-security/runtime",
    "../../../node_modules/nuxt-security/dist/runtime",
    "../../../node_modules/@nuxtjs/tailwindcss/runtime",
    "../../../node_modules/@nuxtjs/tailwindcss/dist/runtime",
    "../../../../../../runtime",
    "../../../../../../dist/runtime",
    "../../../node_modules/@nuxtjs/device/runtime",
    "../../../node_modules/@nuxtjs/device/dist/runtime",
    "..",
    "../../../node_modules/nuxt/dist/app",
    "../../../node_modules/nuxt/dist/app/compat/vue-demi",
    "../../../node_modules/pinia/dist/pinia",
    "../../../node_modules/vue-router/dist/vue-router.node"
  ],
  "exclude": [
    "../public/Cesium/**/*",
    "../dist",
    "../node_modules",
    "../../../node_modules",
    "../../../node_modules/nuxt/node_modules",
    "../../../packages/shared/node_modules",
    "../../../packages/ui-lib/node_modules",
    "../../../node_modules/@nuxt/devtools/runtime/server",
    "../../../node_modules/@nuxt/devtools/dist/runtime/server",
    "../../../node_modules/nuxt-directus/runtime/server",
    "../../../node_modules/nuxt-directus/dist/runtime/server",
    "../../../node_modules/@pinia/nuxt/runtime/server",
    "../../../node_modules/@pinia/nuxt/dist/runtime/server",
    "../../../node_modules/@vueuse/nuxt/runtime/server",
    "../../../node_modules/@vueuse/nuxt/dist/runtime/server",
    "../../../node_modules/nuxt-security/runtime/server",
    "../../../node_modules/nuxt-security/dist/runtime/server",
    "../../../node_modules/@nuxtjs/tailwindcss/runtime/server",
    "../../../node_modules/@nuxtjs/tailwindcss/dist/runtime/server",
    "../../../../../../runtime/server",
    "../../../../../../dist/runtime/server",
    "../../../node_modules/@nuxtjs/device/runtime/server",
    "../../../node_modules/@nuxtjs/device/dist/runtime/server",
    "../.output"
  ]
}

Hey @liamb0t
I am not sure what can be causing it. If I understand correctly, it works if you remove server directory right?
The changes between 1.4.3 to 2.0.0 are quite big to be honest (even including migrating Nuxt versions) so there could be things that we missed.

@Baroshem
Yes, it works fine if I remove the server directory. Also, we use these RuntimeConfig variables outside the server directories and these don't seem to throw any errors at runtime. Only those used in the server directories.

@vejja
Yes, you are right, there is also a tsconfig.json file in the server folder that extends the tsconfig.server.json file in the .nuxt folder. This is the tsconfig.server.json file:
{
  "compilerOptions": {
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noEmit": true,
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "allowJs": true,
    "resolveJsonModule": true,
    "jsx": "preserve",
    "allowSyntheticDefaultImports": true,
    "jsxFactory": "h",
    "jsxFragmentFactory": "Fragment",
    "paths": {
      "#imports": [
        "./types/nitro-imports"
      ],
      "~/*": [
        "../*",
        "../*"
      ],
      "@/*": [
        "../*",
        "../*"
      ],
      "~~/*": [
        "../*",
        "../*"
      ],
      "@@/*": [
        "../*",
        "../*"
      ],
      "nitropack": [
        "../../../node_modules/nitropack"
      ],
      "defu": [
        "../../../node_modules/defu"
      ],
      "h3": [
        "../../../node_modules/h3"
      ],
      "consola": [
        "../../../node_modules/consola"
      ],
      "ofetch": [
        "../../../node_modules/ofetch"
      ],
      "@unhead/vue": [
        "../../../node_modules/@unhead/vue"
      ],
      "@nuxt/devtools": [
        "../../../node_modules/@nuxt/devtools"
      ],
      "vue": [
        "../../../node_modules/vue"
      ],
      "@vue/runtime-core": [
        "../../../node_modules/@vue/runtime-core"
      ],
      "@vue/compiler-sfc": [
        "../../../node_modules/@vue/compiler-sfc"
      ],
      "vue-router": [
        "../../../node_modules/vue-router"
      ],
      "vue-router/auto-routes": [
        "../../../node_modules/vue-router/vue-router-auto-routes"
      ],
      "unplugin-vue-router/client": [
        "../../../node_modules/unplugin-vue-router/client"
      ],
      "@nuxt/schema": [
        "../../../node_modules/@nuxt/schema"
      ],
      "nuxt": [
        "../../../node_modules/nuxt"
      ],
      "#internal/nuxt/paths": [
        "../../../node_modules/nuxt/dist/core/runtime/nitro/paths"
      ],
      "~": [
        "./.."
      ],
      "@": [
        "./.."
      ],
      "~~": [
        "./.."
      ],
      "@@": [
        "./.."
      ],
      "assets": [
        "../assets"
      ],
      "assets/*": [
        "../assets/*"
      ],
      "public": [
        "../public"
      ],
      "public/*": [
        "../public/*"
      ],
      "pinia": [
        "../../../node_modules/pinia/dist/pinia"
      ],
      "#vue-router": [
        "./vue-router"
      ]
    },
    "lib": [
      "esnext",
      "webworker",
      "dom.iterable"
    ]
  },
  "include": [
    "./types/nitro-nuxt.d.ts",
    "../../../node_modules/@nuxt/devtools/runtime/server",
    "../../../node_modules/nuxt-directus/runtime/server",
    "../../../node_modules/@pinia/nuxt/runtime/server",
    "../../../node_modules/@vueuse/nuxt/runtime/server",
    "../../../node_modules/nuxt-security/runtime/server",
    "../../../node_modules/@nuxtjs/tailwindcss/runtime/server",
    "../../../../../../runtime/server",
    "../../../node_modules/@nuxtjs/device/runtime/server",
    "./types/nitro.d.ts",
    "../**/*",
    "../server/**/*"
  ],
  "exclude": [
    "../node_modules",
    "../../../node_modules",
    "../../../node_modules/nuxt/node_modules",
    "../../../packages/shared/node_modules",
    "../../../packages/ui-lib/node_modules",
    "../dist"
  ]
}

If you remove the Nuxt-security module, the TS errors disappear, right?

Sorry to add one more check: if you run npm run prepare, the TS errors are still there?

If you remove the Nuxt-security module, the TS errors disappear, right?

Sorry, where should I remove it from?

If you remove the Nuxt-security module, the TS errors disappear, right?

Sorry, where should I remove it from?

nuxt.config.ts > modules array

If you remove the Nuxt-security module, the TS errors disappear, right?

Sorry, where should I remove it from?

nuxt.config.ts > modules array

Yes, if I remove the module the errors disappear

Ok, can you add it back and then run npm run prepare ? Just to check if the tsconfig gets regenerated

npm run prepare

prepare
npx nuxi prepare

ℹ Using 2024-04-03 as fallback compatibility date.                                                                                10:04:22 AM
✔ Types generated in .nuxt
Looks like tsconfigs do not get regenerated after prepare. I can only see nuxt-security module appear in tsconfig after running dev command.
{
  "name": "monorepo",
  "private": true,
  "type": "module",
  "packageManager"<EMAIL_ADDRESS>  "scripts": {
    "build": "nx run-many -t build",
    "dev": "nx run-many -t dev",
    "dev:cms": "nx dev cms",
    "dev:webview": "nx dev webview",
    "generate": "nx run-many -t generate",
    "lint": "eslint .",
    "lint:fix": "eslint --fix .",
    "typecheck": "nx run-many -t typecheck",
    "transform-tokens": "bun run --filter design-system transform-tokens",
    "generate-surrogates": "bun run --filter editor-surrogates generate-surrogates",
    "test": "nx run-many -t test",
    "prepare": "husky"
  },
  "devDependencies": {
    "@nuxt/eslint-config": "0.6.1",
    "@nuxt/test-utils": "3.14.4",
    "@nuxtjs/device": "3.2.4",
    "@nuxtjs/i18n": "8.5.6",
    "@nuxtjs/tailwindcss": "6.12.2",
    "@stylistic/eslint-plugin": "2.10.1",
    "@types/bun": "1.1.13",
<EMAIL_ADDRESS>"3.58.1",
    "@types/qrcode": "1.5.5",
    "@types/three": "0.169.0",
    "@types/uuid": "10.0.0",
    "@vite-pwa/nuxt": "0.10.6",
    "@vitest/ui": "2.1.4",
    "@vue/test-utils": "2.4.6",
    "@vueuse/nuxt": "11.1.0",
    "colord": "2.9.3",
    "eslint": "9.14.0",
    "eslint-plugin-tailwindcss": "3.17.5",
    "eslint-plugin-vuejs-accessibility": "2.4.1",
    "happy-dom": "15.11.1",
    "husky": "9.1.6",
    "lint-staged": "15.2.10",
    "nuxt": "3.13.2",
    "nuxt-directus": "5.6.1",
    "nuxt-security": "2.0.0",
    "nx": "20.1.0",
    "playwright-core": "1.47.2",
    "protobufjs-cli": "1.1.3",
    "style-dictionary": "4.1.4",
    "tailwindcss": "3.4.14",
    "typescript": "5.6.3",
    "vitest": "2.1.4",
    "vue": "3.5.12",
    "vue-tsc": "2.1.10"
  },
  "dependencies": {
    "@dotlottie/player-component": "2.7.12",
    "@fortawesome/fontawesome-svg-core": "6.6.0",
    "@fortawesome/free-brands-svg-icons": "6.6.0",
    "@fortawesome/free-regular-svg-icons": "6.6.0",
    "@fortawesome/free-solid-svg-icons": "6.6.0",
    "@fortawesome/vue-fontawesome": "3.0.8",
    "@google/model-viewer": "3.5.0",
    "@googlemaps/js-api-loader": "1.16.8",
    "@headlessui/vue": "1.7.23",
    "@heroicons/vue": "2.1.5",
    "@inworld/nodejs-sdk": "1.16.0",
    "@inworld/web-core": "2.8.0",
    "@pinia/nuxt": "0.5.5",
    "@unovis/ts": "1.4.4",
    "@unovis/vue": "1.4.4",
    "@vee-validate/zod": "4.14.7",
    "@vercel/analytics": "1.3.2",
    "@vueuse/core": "11.1.0",
    "cesium": "1.123.1",
    "class-variance-authority": "0.7.0",
    "clsx": "2.1.1",
    "deck.gl": "9.0.35",
    "embla-carousel": "8.3.1",
    "embla-carousel-vue": "8.3.1",
    "http-server": "14.1.1",
    "livekit-client": "2.6.0",
    "livekit-server-sdk": "2.7.3",
    "long": "5.2.3",
    "lucide-vue-next": "0.447.0",
    "mapbox-gl": "3.7.0",
    "nuxt-swiper": "2.0.0-1",
    "pinia": "2.2.6",
    "protobufjs": "7.4.0",
    "qrcode": "1.5.4",
    "radix-vue": "1.9.9",
    "tailwind-merge": "2.5.4",
    "tailwindcss-animate": "1.0.7",
    "three": "0.170.0",
    "uuid": "10.0.0",
    "vaul-vue": "0.2.0",
    "vee-validate": "4.13.2",
    "zod": "3.23.8"
  },
  "workspaces": [
    "packages/*",
    "apps/*"
  ],
  "patchedDependencies": {
<EMAIL_ADDRESS><EMAIL_ADDRESS>  }
}

It’s quite difficult for me to say.
You have a very custom setup with NX, bun and workspaces on top of Nuxt layout extensions.
In my own project, runtimeConfig types are generated when I run ‘npx nuxi prepare’. This is the step where ´unknown’ becomes ´string’, and this happens because the tsconfig file is regenerated by nuxi with the proper types.
On your end, you have the right types if you don’t use Nuxt Security, which seems to indicate that we are doing something with the types on our end. But I looked at the code and I cannot find a place where we modify the RuntimeConfig type - so I am puzzled at this stage.
I’d like to get the advice of @danielroe here.
Is there something we should do differently with types?

I cannot see runtimeConfig types in tsconfig, only in .nuxt/types/scheme.d.ts and there the type is string, not unknown. But the the module is 'nuxt/schema' without the @?
declare module 'nuxt/schema' {
  interface NuxtOptions {
    /**
     * Configuration for `@nuxt/devtools`
     * @see https://www.npmjs.com/package/@nuxt/devtools
     */
    ["devtools"]: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? O : Record<string, any>
    /**
     * Configuration for `nuxt-directus`
     * @see https://www.npmjs.com/package/nuxt-directus
     */
    ["directus"]: typeof import("nuxt-directus").default extends NuxtModule<infer O> ? O : Record<string, any>
    /**
     * Configuration for `@pinia/nuxt`
     * @see https://www.npmjs.com/package/@pinia/nuxt
     */
    ["pinia"]: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
    /**
     * Configuration for `@vueuse/nuxt`
     * @see https://www.npmjs.com/package/@vueuse/nuxt
     */
    ["vueuse"]: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
    /**
     * Configuration for `nuxt-security`
     * @see https://www.npmjs.com/package/nuxt-security
     */
    ["security"]: typeof import("nuxt-security").default extends NuxtModule<infer O> ? O : Record<string, any>
    /**
     * Configuration for `@nuxtjs/tailwindcss`
     * @see https://www.npmjs.com/package/@nuxtjs/tailwindcss
     */
    ["tailwindcss"]: typeof import("@nuxtjs/tailwindcss").default extends NuxtModule<infer O> ? O : Record<string, any>
    /**
     * Configuration for `@nuxt/test-utils/module`
     * @see https://www.npmjs.com/package/@nuxt/test-utils/module
     */
    ["testUtils"]: typeof import("@nuxt/test-utils/module").default extends NuxtModule<infer O> ? O : Record<string, any>
    /**
     * Configuration for `@nuxtjs/device`
     * @see https://www.npmjs.com/package/@nuxtjs/device
     */
    ["device"]: typeof import("@nuxtjs/device").default extends NuxtModule<infer O> ? O : Record<string, any>
  }
  interface NuxtConfig {
    /**
     * Configuration for `@nuxt/devtools`
     * @see https://www.npmjs.com/package/@nuxt/devtools
     */
    ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    /**
     * Configuration for `nuxt-directus`
     * @see https://www.npmjs.com/package/nuxt-directus
     */
    ["directus"]?: typeof import("nuxt-directus").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    /**
     * Configuration for `@pinia/nuxt`
     * @see https://www.npmjs.com/package/@pinia/nuxt
     */
    ["pinia"]?: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    /**
     * Configuration for `@vueuse/nuxt`
     * @see https://www.npmjs.com/package/@vueuse/nuxt
     */
    ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    /**
     * Configuration for `nuxt-security`
     * @see https://www.npmjs.com/package/nuxt-security
     */
    ["security"]?: typeof import("nuxt-security").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    /**
     * Configuration for `@nuxtjs/tailwindcss`
     * @see https://www.npmjs.com/package/@nuxtjs/tailwindcss
     */
    ["tailwindcss"]?: typeof import("@nuxtjs/tailwindcss").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    /**
     * Configuration for `@nuxt/test-utils/module`
     * @see https://www.npmjs.com/package/@nuxt/test-utils/module
     */
    ["testUtils"]?: typeof import("@nuxt/test-utils/module").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    /**
     * Configuration for `@nuxtjs/device`
     * @see https://www.npmjs.com/package/@nuxtjs/device
     */
    ["device"]?: typeof import("@nuxtjs/device").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
    modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["nuxt-directus", Exclude<NuxtConfig["directus"], boolean>] | ["@pinia/nuxt", Exclude<NuxtConfig["pinia"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["nuxt-security", Exclude<NuxtConfig["security"], boolean>] | ["@nuxtjs/tailwindcss", Exclude<NuxtConfig["tailwindcss"], boolean>] | ["@nuxt/test-utils/module", Exclude<NuxtConfig["testUtils"], boolean>] | ["@nuxtjs/device", Exclude<NuxtConfig["device"], boolean>])[],
  }
  interface RuntimeConfig {
   app: {
      buildId: string,

      baseURL: string,

      buildAssetsDir: string,

      cdnURL: string,
   },

   DIRECTUS_API_TOKEN: string,

Is this your full schema.d.ts ?
Mine is much bigger, extends @nuxt/schema and also defines the PublicRuntimeConfig interface

@vejja No, sorry, it wasn't. I edited my comment.

Ok so we explicitly modified nuxt/schema to @nuxt/schema as part of PR #520 which was a component of v2.
We did this to conform to @danielroe recommendations for the new nuxt-module-builder
The upstream change was referenced here : https://github.com/nuxt/nuxt/issues/28332

@vejja No, sorry, it wasn't. I edited my comment.

On the surface of it, it looks like now your types are correct, aren't they ?

As pointed out by @vejja this change was a recommendation from Daniel so I believe we would need to keep it this way.
If you agree guys, I would be up for closing this ticket as won't fix as it is how the @nuxt/module-builder works now.

this is likely not related to nuxt security. can you reproduce without the module?

Renovate managed to install v.2.0.0 successfully without me doing anything, so maybe was a problem with another module. I will close this, thanks for the help.

Renovate managed to install v.2.0.0 successfully without me doing anything, so maybe was a problem with another module. I will close this, thanks for the help.


Default to add '-wdir' arguments

Change logic in experiments  to default to adding -wdir to the arguments given to mpirun.
Should close #341

coverage: 41.368% (+0.1%) from 41.267% when pulling adba4bd6b0da306109b8de6ca1f6773d38b2778c on jo-basevi:341-missing-wdir-arg into aacfd92570d6f33487ec4de47f9ad8b7a7fa8f12 on payu-org:master.

Is the MVIPICH wrapper still used? If so, I could revert the changes and only add ‘-wdir’ arguments if mpi_module does not start with ‘mvapich’ rather than previously which was checking mpi_module starts with openmpi?

Looks like MPICH supports -wdir in any case, so this code is redundant and should be removed
https://www.mpich.org/static/docs/v3.4.x/www1/mpiexec.html
See https://github.com/payu-org/payu/issues/350


Add global scope support or allow withoutGlobalScopes() in relations

Hi, I have an error:
"Package allows only SoftDeletingScope global scope."
I don't need soft deleting. My model has global scope
static::addGlobalScope( function($query) {
    $query->where('isEntering', false);
});

Without it all works fine, but I want it to remain.
I tried to add withoutGlobalScopes() to relation, but it shows another error:
"Package allows only following clauses on relation : where, orWhere, withTrashed, onlyTrashed and withoutTrashed."
I watched the sources. Is seems withoutGlobalScopes() doesn't remove $relationBuilder->scopes (maybe) but adds $relationBuilder->relationClauses with $method = 'withoutGloalScopes'... and it is not supported (as second error says).

Temporary fixed by adding to applyClauseOnRelation in my fork
} elseif ($method === 'withoutGlobalScopes') {
            //do nothing

Laravel is very flexible so it is really hard to support all those options like global scopes. I just put constraint that you can't use global scopes if you want to use this package, from my side this behavior that you described is perfectly normal, you can't combine global scopes if you want to use this package....Of course it would be nice that your case is resolved, feel free to submit a PR with the test....

@fico7489
I know this is quite old topic. But it's not clear for me...
Why using this package we are unable to define global socpes, what are caveats, what is motivations for that, what am I missing?
Would you be so kind to help me understand or at least point me where can I get knowledge?

@fico7489
I know this is quite old topic. But it's not clear for me...
Why using this package we are unable to define global socpes, what are caveats, what is motivations for that, what am I missing?
Would you be so kind to help me understand or at least point me where can I get knowledge?


Restarting nginx clears certificates stored on disk

Hi,
This is more of a question than an issue. I've noticed that restarting nginx clears my lets encrypt certificates from file storage. Is this expected behaviour or is there a config option I am missing to keep certificates upon restarting nginx?
Thanks

That would be a severe bug in my opinion, since it triggers way more certificate issues than necessary. I'll take a look later.

Sadly I cannot reproduce this with version 0.10.4-1 or 0.10.2-1 and openresty <IP_ADDRESS>-9.el7.centos.
@jackmiller334 I need you help with that. Which version and environment are you using?

Oh, I'm missing a couple of versions here. So, for the sake of completeness: restarting also works using 0.10.6-1.

Thanks for taking a look, I am running inside a Docker container built from the base centos:7 image.

openresty <IP_ADDRESS> built from source inside a centos 7 docker image.
Luarocks 2.3.0, built from source
lua-resty-auto-ssl 0.10.6-1, installed using luarocks

Would you mind sharing your simplified Dockerfile?
On May 23, 2017 12:04:45 PM GMT+02:00, Jack Miller<EMAIL_ADDRESS>wrote:

Thanks for taking a look, I am running inside a Docker container built
from the base centos:7 image.

openresty <IP_ADDRESS> built from source inside a centos 7 docker
image.
Luarocks 2.3.0, built from source
lua-resty-auto-ssl 0.10.6-1, installed using luarocks

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/GUI/lua-resty-auto-ssl/issues/71#issuecomment-303352394

Hi, I believe I have solved the issue. I had  auto_ssl:set("dir", "/tmp"), so /tmp would be wiped. I updated my config to use a new directory and gave it the correct permissions. I restarted nginx 10 times and the certificate was served promptly each time without another letsencrypt request being made.
Thank you for looking into my issue 😄

Glad you found the cause of your issue :)


Allow interactive sampling

The python library uses the sample method as a generator, allowing interaction with code outside of the sampler. We could implement this with a method that takes a callback, so the user can supply a closure.

This change is

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

src/lib.rs, line 359 at r1 (raw file):

    }

    /// Run the sampler with a callback called on each iteration

Can we get some high level documentation about this new feature?

Comments from Reviewable

Reviewed 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions.

src/lib.rs, line 297 at r1 (raw file):
Previously, mindriot101 (Simon Walker) wrote…
We should also add the iteration value in case the user wants it

Done.

src/lib.rs, line 359 at r1 (raw file):
Previously, mindriot101 (Simon Walker) wrote…
Can we get some high level documentation about this new feature?

Done.

Comments from Reviewable

Review status: all files reviewed at latest revision, all discussions resolved.

src/lib.rs, line 359 at r1 (raw file):
Previously, mindriot101 (Simon Walker) wrote…
Done.

OK

Comments from Reviewable


refactor center onMessage, and create UT

Linked GitHub issue ID: #
Pull Request Checklist

[x] Tests for the changes have been added (for bug fixes / features)
[x] Code compiles correctly with all tests are passed.
[x] I've read the contributing guide and followed the recommended practices.
[ ] Wikis or README have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?
If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.

[ ] Yes
[x] No

Pull Request Description
A few words to explain your changes:  refactor center onMessage, and create UT
How you tested it
Please make sure the change is tested, you can test it by adding UTs, do local test and share the screenshots, etc.
Please check the type of change your PR introduces:

[ ] Bugfix
[ ] Feature
[ ] Build related changes
[x] Refactoring (no functional changes, no api changes)
[ ] Code style update (formatting, renaming) or Documentation content changes
[ ] Other (please describe):

Feature UI screenshots or Technical design diagrams
If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...

@zhou9584 could you help review this PR when it's a convenient time for you? Thanks!
And thank you so much for helping resolve the UT issue.

LGTM for the rest.


Add fix and tests for postfix pound ifs

Fixes #303
This solution feels kind of messy and I'd be happy to clean it up some if y'all have any guidance. I branched off of release/5.6 since this issue exists there, please let me know if using a different base is better.

But the main branch has fallen behind the latest development snapshots until #384 is merged

That PR has now been merged, so if you make the requested changes and rebase on top of main, I can help with any testing to make sure it works on that branch as well.

But the main branch has fallen behind the latest development snapshots until #384 is merged

That PR has now been merged, so if you make the requested changes and rebase on top of main, I can help with any testing to make sure it works on that branch as well.

I finally found some time to work on this. I think my solution is greatly improved but I'm not sure if the output is what is expected in all cases -- I'd appreciate feedback on that.


Partners: Update Wagento + Add Retail Insights

Related Issues

closes #
Short Description and Why It's Useful

Screenshots of Visual Changes before/after (if There Are Any)

Which Environment This Relates To
Check your case. In case of any doubts please read about Release Cycle

[ ] Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
[ ] RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
[ ] Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

[x] No upgrade steps required (100% backward compatibility and no breaking changes)
[ ] I've updated the Upgrade notes and Changelog on how to port existing Vue Storefront sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change
Contribution and Currently Important Rules Acceptance

[ ] I read and followed contribution rules

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: tom-aniol:x: gibkigonzoYou have signed the CLA already but the status is still pending? Let us recheck it.


libressl 2.2.0: Fix for linuxbrew

Fix the error: The post-install step did not complete successfully

Thanks for your contribution, Paul.


Implement API to customize loop.create_task()

In asyncio we try to avoid using or encouraging to use subclassing as APIs.
However, the only way to customize the recently added 'create_task()' method is
to subclass event loops, which is not always convenient.

An example of this is the greenio library, which provides a subclassed
'asyncio.SelectorEventLoop' and a custom event loop policy just for the sake of
customizing the 'create_task' method. Users of other kinds of event loops will
have to do the same subclassing dance.

I propose to add two new API methods to event loops (similarly to what we did
for custom handlers):

- set_task_factory(callable)
- default_task_factory(coro)

Here's a link to codereview: https://codereview.appspot.com/148240043

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 27 Sep 2014 at 5:09

Guido, Victor,
I really need this feature. This is the only last thing that requires subclassing the loop.
I propose to add one just one new method to event loop API: set_task_factory.  I don't think that event loop policy is a good place for it.

set_task_factory(factory) sets the factory
set_task_factory(None) tells the loop that it can use the default factory

If you're OK with this, I'll write a patch and make a PR.

I thought it was this and the DNS lookup? :-)
Anyway, I'm fine with this. We should probably also have a get_task_factory() just so it can be managed in a stack-wise fashion if one really wishes.

:)  Alright, I'll make a PR soon!

Closing the issue now.


Allow wrapping of PackageContext

Turn PackageContext into an interface so that build systems can wrap it
to add more custom helpers.
This does introduce an API change, though it should be fairly simple.
NewPackageContext used to provide an opaque *PackageContext struct, now it
provides a PackageContext interface.

Because the ModuleContext.(Variable|Rule|Build) functions take a *PackageContext directly, so we'd need to unwrap the struct on every one of those calls.

True, but aren't you already going to wrap the ModuleContext functions?

We cannot change the function signatures, since we embed blueprint.ModuleContext in the AndroidModuleContext interface. So we can wrap them in different names, but the originals still must exist in our interface.
They're also on SingletonContext, which we don't wrap currently, but we don't use many of those, so unwrapping wouldn't be too bad.

LGTM


Add Roles as sub-tab within the User tab

probably not the ideal solution to specifiy a partial, as if other
extensions specify one, or solidus itself specifies one, we'd be
overriding it. Oh well, that's for a different day.

I had done this: https://github.com/boomerdigital/solidus_user_roles/commit/d51182edf717120ea2776db647e1b9350779af46
Not as pretty but does the job.

No, actually your way is better, as if someone else decides to add a partial underneath User, this one will break. I'd prefer yours!


Library Dart Packages has broken classes path:

Hi,
the android studio  somehow can not show suggestions as I type.
finally I found that the flutter project has a problem as blow:

I have tried many times to Fix , but it will appear again.
I don't no why,please do me a favor.
Thanks a lot any way.

Hi @ShengjieGeng
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
I found a SO question that may help you, see https://stackoverflow.com/questions/26842778/dart-import-packages-not-working
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you


Spaces in ssh key file names prevent them from being copied into the VM

From @sanderson on December 5, 2016 15:23
This was found by @danhunsaker which helped troubleshoot a problem @atourino ran into:
https://github.com/nanobox-io/nanobox/blob/master/generators/hooks/build/user.go#L15

Not sure the best way to make Ruby properly quote shell commands inside the VM, but that'll be the actual fix

Copied from original issue: nanobox-io/nanobox#282

Wasn't this already addressed?
Sent from my Samsung SM-J327P using FastHub


Habit Tracker

Experience
Anytype.20231212.193426.18.zip
Title
Habit Tracker
Screenshots

Description
Become your best self and document the results of your healthy habits. Track your sleep, energy, mood and more using a habit tracker.
Categories
Personal Growth, Health & Fitness
Language
en-US

/gallery approve


Update scapy

scapy-python3 is an unofficial fork that is getting very oudated (many bug fixes missing).
Migrates to original and up-to-date scapy, which now supports python 3

It is great news that scapy supports now python 3. Thanks for letting me know.
I need to check that nothing else breaks changing the dependency.
Is there any documentation about the compatibility between scapy python 3 and what is now kamene?

Not really.
What is working with kamene should be mostly working with scapy (except for some very minor changes). The opposite isn’t true, as kamene is missing a lot of layer integrations, fields and fixes (e.g. DNS layer is crashing a lot with kamene)
It should be easy.
Only real difference (other than bug fixes & new stuff) is that scapy kept python 2 support, and therefore sometimes has compatibility layers, but you should not be affected by that

I've checked dhcpcanon with scapy 2.4.0 and it seems nothing breaks, awesome!.
Still i might wait until scapy python 3 is packaged for Debian to change the dependency. It has already been reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889938.

FTR python3-scapy is now pointing at secdev’s repo


Remove latest_backup_status and latest_import_status from resources

The latest_backup_status and latest_import_status attributes are slow to compute and unnecessary for most users. Those attributes are also not a great fit for a Terraform resource. Therefore, this PR removes them to make the Plan/Apply much faster for the general case.
Users can still obtain those attributes via data sources. The migration guide, also included in this PR, describes how to migrate to them.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


[Masonry] Items at the bottom of component fail to be rendered on Chrome

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
Chrome limits the number of grid rows to 1000 at the maximum. Overflowing items beyond the 1000th row are simply squashed. A row size of 2px is used for Masonry component. Hence, the maximum height of the masonry is 2000px, and items that go beyond this height fail to be rendered correctly. It is worth noting that this limitation does not exist in Firefox or Safari.
Expected Behavior 🤔
Masonry should be able to render all items correctly on Chrome.
Steps to Reproduce 🕹
https://codesandbox.io/s/imagemasonry-material-demo-forked-x4fyc?file=/demo.js

Steps:

Change the number of columns, columns, to 3 (where masonry's height doesn't exceed 2000px). All items are rendered correctly.
Now, change the number of columns, columns, to 2 (which causes masonry's height to exceed 2000px). The items beyond the maximum height (hence at the bottom) fail to be rendered but rather are squashed.

Context 🔦
The 2,000px height limit is insufficient for dashboards with charts, stats, tables, or images. With the current design (using a row gap of 2px), virtualisation is a good candidate to fix this issue, or there could be other smart workarounds.
Your Environment 🌎
Chrome browser

`npx @material-ui/envinfo`
```
  Don't forget to mention which browser you used.
  Output from `npx @material-ui/envinfo` goes here.
```

Possible solutions:

Add a new prop to allow developers to configure the tradeoff. They could trade less item height precision for a higher max-height or the opposite.
Replace the CSS grid implementation with a flex: order, based on  https://github.com/gilbitron/flexmasonry. Discussed a bit from https://github.com/mui-org/material-ui/pull/27439#issuecomment-903138678
Move to a absolute positioning implementation
Proposals?

Could it be an option to have a virtualized content so that when you scroll down only X need to be rendered?

@Primajin Feel free to open a new issue for virtulization support with Masonry.

https://github.com/mui-org/material-ui/issues/28586 👍🏻

@oliviertassinari @mnajdova @eps1lon The first usage of masonry component within the team is rejected https://github.com/mui-org/material-ui/pull/28485#pullrequestreview-758403285 because of its known limitation, which is described in this issue:

Chrome limits the number of grid rows to 1000 at the maximum. Overflowing items beyond the 1000th row are simply squashed. A row size of 2px is used for Masonry component. Hence, the maximum height of the masonry is 2000px, and items that go beyond this height fail to be rendered correctly.

I think this is a clear indication that we should consider switching to the other implementation, the flexbox approach, here: https://github.com/mui-org/material-ui/pull/28059. Its only downside compared to the current implementation is that it doesn't support column spanning. Still, I think that the lack of column spanning support is miniscule compared to the limitation of current masonry, which fails to render items beyond a certain threshold.
If we decide to switch to the other implementation, I will modify the masonry blog post accordingly.


Cleanup SSL error code space

This PR removes all message-specific MBEDTLS_ERR_SSL_BAD_HS_XXX error codes and introduces error codes which instead give the generic reason of the failure, rather than the location of failure. Those new error codes are aligned with TLS alert codes, and the most important ones are MBEDTLS_ERR_SSL_DECODE_ERROR for syntactic failures during parsing, and MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER, for semantic failures during parsing.

It's currently not looking like I'll be able to review this today. I'll do what I can but I have other higher-priority reviews on my queue.

IMO backporting the non-bugfix alert changes is probably scope-creep; and I think users are likely to prefer to retain existing behaviour on 2.x / 2.16 (where it's not a bug).

CI is unhappy.

Thanks @gilles-peskine-arm and @ronald-cron-arm for the review.
How should we proceed with this?
Originally, the intention of this PR was to change error codes only: (a) Remove BAD_HS_XXX codes, and (b) Introduce error codes for semantic and syntactic error, matching the corresponding alert messages.
However, it turned out that (a) there are multiple cases where we returned the wrong alert message, and it wouldn't make sense to return e.g. a decode_error error code and send an illegal_parameter alert, and (b) there are other alert messages which don't have matching SSL error codes. This led to the current PR, which adjusts alerts alongside error codes and adds further SSL error codes beyond decode_error and illegal_parameter.
There are still open points of discussion: (a) There are cases where we can't know which alert / error code to pick, unless we split if( cond1 || cond2 || ... || condN ) { error } into separate branches. (b) There are cases where we don't yet have a matching SSL error code.
I don't think those need to be resolved here: The current PR is, IMO, an improvement, and we can build on it in the future. Some changes can even be made in minor revisions, as far as I understand, such as refining error checks and adjusting return values and alerts accordingly. This would need to stay within the bounds of 3.0 error codes, though, so it would be good to get siblings for the most important alerts. We don't have an exact match for every alert at the moment, e.g. there's no MBEDTLS_ERR_SSL_UNSUPPORTED_EXTENSIONS, but it's not clear to me if we want that, so I'd rather not rush into it and go with the more generic error codes that we do have; after all, the user has the ability to turn on debugging, while the peer has to make do with the information in the alerts, so from that perspective it seems OK that at times the alert is more expressive than the error code.

There are cases where we can't know which alert / error code to pick, unless we split if( cond1 || cond2 || ... || condN ) { error } into separate branches

That's not a big deal, and in fact it would be a readability improvement, unless the if is buried in a function. I noticed that in many places this PR has code like
ret = auxiliary_function();
if(ret != 0) {
    DEBUG("foo error in thing");
    send_alert_message(ALERT_MSG_FOO);
    return MBEDTLS_ERR_SSL_FOO;
}

which could be turned into
ret = auxiliary_function();
if(ret != 0)
    return sending_alert("thing", ret);

where sending_alert picks the alert from ret. This would allow auxiliary functions to report different alerts without increasing the code size. This does require having enough distinct error codes though, which this PR doesn't quite achieve yet, but easily could.

We don't have an exact match for every alert at the moment, e.g. there's no MBEDTLS_ERR_SSL_UNSUPPORTED_EXTENSIONS, but it's not clear to me if we want that, so I'd rather not rush into it and go with the more generic error codes that we do have; after all, the user has the ability to turn on debugging, while the peer has to make do with the information in the alerts, so from that perspective it seems OK that at times the alert is more expressive than the error code.

I agree, but I don't see why we wouldn't add a couple of error codes just so that they match alerts. I don't think it's vital that error codes match alerts, but if we have distinct error codes for ILLEGAL_PARAMETERS and DECODE_ERROR and HANDSHAKE_FAILURE, we might as well finish the work.

This would allow auxiliary functions to report different alerts without increasing the code size.

I agree, this would be ideal. In fact, in this case we wouldn't need to call send_alert() at any point of failure, but could move it up the call chain. This is partly already happening in the TLS 1.3 / MPS branch, where we have a PEND_ALERT() macro which just sets a flag, but defers sending the alert - this also avoids having to deal with a WANT_WRITE error after every potentially failing function.

I agree, but I don't see why we wouldn't add a couple of error codes just so that they match alerts.

One reason would be to deliberately keep the error space simple and leave fine-grained failure information to debugging - as mentioned before. But I think that's a weak argument, given that there's not a big delta left between SSL error codes and alert messages, and making error codes a superset of alert messages enables greater simplications in terms of sending alerts than what you gain a handful fewer error codes.

Here's the complete list of alerts from RFC 5246, annotated with matching / close SSL error codes:
close_notify(0),                    // For the sender, we don't need an error code. For the receiver, we have MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY
unexpected_message(10),             // MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE
bad_record_mac(20),                 // MBEDTLS_ERR_SSL_INVALID_MAC
decryption_failed_RESERVED(21),     // deprecated
record_overflow(22),                // no exact match. MBEDTLS_ERR_SSL_INVALID_RECORD is close enough.
decompression_failure(30),          // irrelevant
handshake_failure(40),              // MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE
no_certificate_RESERVED(41),        // deprecated
bad_certificate(42),                // MBEDTLS_ERR_SSL_BAD_CERTIFICATE
unsupported_certificate(43),        // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
certificate_revoked(44),            // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
certificate_expired(45),            // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
certificate_unknown(46),            // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
illegal_parameter(47),              // MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER
unknown_ca(48),                     // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
access_denied(49),                  //
decode_error(50),                   // MBEDTLS_ERR_SSL_DECODE_ERROR
decrypt_error(51),                  // no exact match. MBEDTLS_ERR_SSL_INVALID_MAC ?
export_restriction_RESERVED(60),    // deprecated
protocol_version(70),               // MBEDTLS_ERR_SSL_BAD_PROTOCOL_VERSION
insufficient_security(71),          // no exact match. MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE? We never send this alert.
internal_error(80),                 // MBEDTLS_ERR_SSL_INTERNAL_ERROR
user_canceled(90),                  // no error code needed
no_renegotiation(100),              // no match
unsupported_extension(110),         // no match

Thanks for compiling this list!
record_overflow(22),                // no exact match. MBEDTLS_ERR_SSL_INVALID_RECORD is close enough?

Agreed.
unsupported_certificate(43),        // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
                                    // can use verify_result to determine appropriate alert
certificate_revoked(44),            // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
                                    // can use verify_result to determine appropriate alert
certificate_expired(45),            // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
                                    // can use verify_result to determine appropriate alert
certificate_unknown(46),            // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
                                    // can use verify_result to determine appropriate alert
unknown_ca(48),                     // no exact match. MBEDTLS_ERR_SSL_BAD_CERTIFICATE?
                                    // can use verify_result to determine appropriate alert

Agreed.
access_denied(49),                  //

Turns out there's just this one place where we send it. So I could be convinced that we shouldn't complicate the library just for the sake of this one case, and we should send another alert. However, since the place where we're sending the alert currently knows exactly what it's doing, I propose to keep the alert as it is but map it to a different error code. Possible MBEDTLS_ERR_SSL_BAD_CERTIFICATE? I'm not sure if that makes sense, since it is a certificate mismatch of some kind, but specifically one that happens during a renegotiation and is more likely to be an attack than a misconfiguration.
decrypt_error(51),                  // no exact match. MBEDTLS_ERR_SSL_INVALID_MAC ?

Agreed.
insufficient_security(71),          // no exact match. MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE? We never send this alert.

Indeed HANDSHAKE_FAILURE would be a good match if the need arises.
no_renegotiation(100),              // no match

This is never a fatal alert so it won't have a matching error code.
unsupported_extension(110),         // no match

Let's add MBEDTLS_ERR_SSL_UNSUPPORTED_EXTENSION just so we can have the idiom where an inner function returns an error code, and higher-level code maps it to an alert.

There are four more alerts in our code base, defined in other RFCs.

INAPROPRIATE_FALLBACK (sic — the official name is the correctly spelled inappropriate_fallback) (SCSV) — we don't send it anymore.
UNRECOGNIZED_NAME (SNI) — that's a special case of HANDSHAKE_FAILURE. It's important for the client to know what the problem was, but from the server's perspective, it's just a client that couldn't connect. I think it makes sense to return HANDSHAKE_FAILURE.
UNKNOWN_PSK_IDENTITY (PSK) — that's either a special case of HANDSHAKE_FAILURE or a variant of BAD_CERTIFICATE. It might be worth keeping that one separate because it can plausibly mean a bad configuration in the client or in the server.
NO_APPLICATION_PROTOCOL (ALPN) — same reasoning as UNRECOGNIZED_NAME.

Notes from call:

Add MBEDTLS_ERR_SSL_UNSUPPORTED_EXTENSION and return where we send unsupported_extension alert.
Add MBEDTLS_ERR_SSL_NO_APPLICATION_PROTOCOL and return where we send no_application_protocol alert (ALPN).
Remove MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE and MBEDTLS_ERR_SSL_NO_CIPHERSUITE_CHOSEN (1x use each), replace by MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE.

Defer potential auto-derivation of alerts from error codes to 3.X.

Comparing the report from analyze_outcomes.py in the nightly from 27 June and this PR at c42409820b3b596d0ed45e60927c287080d0eae3:
diff nightly.txt pr.txt
24,28d23
< Warning: Test case not executed: ssl-opt;ECJPAKE: password mismatch, DTLS
< Warning: Test case not executed: ssl-opt;ECJPAKE: password mismatch, TLS
< Warning: Test case not executed: ssl-opt;ECJPAKE: working, DTLS
< Warning: Test case not executed: ssl-opt;ECJPAKE: working, DTLS, no cookie
< Warning: Test case not executed: ssl-opt;ECJPAKE: working, DTLS, nolog

This corresponds to the corrected dependencies on ECJPAKE, and no test case became not-executed. So the change to maybe_requires_ciphersuite_enabled hasn't caused a significant loss of coverage.


Make startup notification optional

Thanks for this nice tool.
It would be very nice to have a configuration option, whether or not I want to be informed when ouroboros runs.
At the moment I always get two Mails or IFTTT notifications. One with just the information that ouroboros has started (even when it does not update anything), and then one with the information which containers were upgraded.
If I use Ouroboros via CRON daemon, I'll get the startup notification every time the container runs. That usually contains no real value for me, but it fills my inbox. (At the moment, I'm filtering it via content filter rules in my inbox, but it would be nice if Ouroboros would be configurable to not always send a startup notification, something like --send-startup-notification=false with a default to true or whatever).
Thank you :)

Merged into develop
#261


Icon on marked folder

Currently, I can't see a checkmark on the marked folder, is that possible to fix that?

HI @serhiijun,
Unfortunately, as of today, the VS Code API does not provide any way to add a checkmark on the marked folder. We can only change the color of the folder name, and add a colored round mark. Both of these features are already implemented.
In the future, if the VSCode API provides better customization options for the folders in the explorer, I'll definitely implement that 😀!


fix(plots): Funnel color

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


save and update strips out long lines of code

Hello,
I've faced really confusing error with packages which have really long source code lines. I'm not sure is this really an error in godep or is it a bug in Go standard library, but I thought it might be a good idea to start here.
Basically, I was trying to import package unicode, which built fine with my application on my development machine. However, after dumping the dependency and trying to run tests for it on my CI service, I got error saying that the variable tableData was undefined.
I initially though this was a problem with the unidecode package's git import path, so I vendored the package, but it did not fix the problem.
Eventually I tried importing the variable in my vendored package by splitting the line into five variables.
When I tried to include the updated package in my project, I noticed from that SourceTree indicated line removals after running go get -u github.com/9uuso/unidecode and godep update github.com/9uuso/unidecode. These line removals were made after line 28. Line 28 was now the last line of the file.

I now checked my application's git history and saw that the line where the tableData should have been, was missing, even though when comparing with the original package, it was there. The git commit hash in the Godeps.json and in the latest unidecode commit matched.
The bug can be worked around by manually adding the line to the Godeps folder.
Any input on this?

Just ran into this as well. The problem is here: https://github.com/tools/godep/blob/0baa7ea464025b2cb8e84b13c5ac4da99237a1bf/save.go#L358 . bufio.Scanner cannot handle lines > bufio.MaxScanTokenSize (64 KB). A common case where this comes up is when importing go files that embed static files (e.g. when using https://github.com/rakyll/statik).
I'll try to submit a patch if I get a chance to work on this.

This should now be fixed by #231.