Failed to connect to device IP.

I tried several IPs from shodan.io but none of them could connect in ghost framework. Seen many closed issues with the same problem, don't know why they are getting closed without getting a proper and genuine reply. I hope now this may not get closed without proper explanation of the problem and steps of how to solve this.

Can you give examples of IP’s that you used? Do they have "Android Debug Bridge" in description?

Used IPs like <IP_ADDRESS> as shown in attached screenshot and they have android debug bridge in description.

How do you run ghost? Do you use ./ghost or ghost?

How do you run ghost? Do you use ./ghost or ghost?

ghost

Maybe this IPs don't work because the phone is shutdowned.

Maybe this IPs don't work because the phone is shutdowned.

But I tried many IP addresses may be 10-15 IPs and none of them connected

Maybe this IPs don't work because the phone is shutdowned.

But I tried many IP addresses may be 10-15 IPs and none of them connected

I tried the second IP from your screenshot and ghost connected to it.

And as I can see it is not only m

Maybe this IPs don't work because the phone is shutdowned.

But I tried many IP addresses may be 10-15 IPs and none of them connected

I tried the second IP from your screenshot and ghost connected to it.

That's the problem bro.. it is not working on my kali machine. And i am not the only who is getting this issue, they are many others in closed issue section.

Ok.

My host Machine is connected to wifi but kali machine getting internet through NAT Network from virtualbox.

My host Machine is connected to wifi but kali machine getting internet through NAT Network from virtualbox.

Can you add a screenshot of your problem?

My host Machine is connected to wifi but kali machine getting internet through NAT Network from virtualbox.

Can you add a screenshot of your problem?

Yes i can but it will take some time as it is shut as of now and will  need to first start it

I tried a lot of IPs and most of them are offline

Very stupid question: Are you connected to WiFi?

My host Machine is connected to wifi but kali machine getting internet through NAT Network from virtualbox.

Can you add a screenshot of your problem?

These are screenshots.... Tried almost all IPs from shodan first 2 pages but none of them connected.

Do you know shodan? Shodan shows a lot of offline devices

Maybe this IPs don't work because phones are shutdowned.

Maybe, maybe not vulnerable, maybe first learn shodan.

Now I got it, If previous unanswered closed issue's would have got genuine answer then I wouldn't have made this thread

Oh my. I tried another version of ghost and it successfully connected to all the IPs, but this version tells that it can't connect to this IPs.

@game-lover because in the previous versions was a problem that connects you to the offline devices.

Check code!

@game-lover follow the <====
elif ui[0] == "connect":
            if len(ui) < 2:
                print("Usage: connect <device>")
            else:
                target = ui[1].split(':')[0]
                print(G+"Connecting to "+target+"...")
                os.system("chmod +x core/dctl.sh && core/dctl.sh connect "+target+"")
                is_connected = os.popen("adb devices | grep "+target+"").read()
                is_offline = os.popen("adb devices | grep offline").read()
                if is_connected == "":
                    print(E+"Failed to connect to "+target+"!")
                    os.system("chmod +x core/dctl.sh && core/dctl.sh disconnect "+target+"")
                    main()
                else:
                    if is_offline == "":
                        pass      # <====
                    else:
                        print(E+"Failed to connect to "+target+"!")       # <====
                        os.system("chmod +x core/dctl.sh && core/dctl.sh disconnect "+target+"")
                        main()
                time.sleep(0.5)
                print(G+"Sending payload to "+target+"...")
                time.sleep(1)
                device = target

But, I connected to the shell

But, I connected to the shell

Ok. If you think that something wrong, you can modify the code.

So, now when this issue has been opened again, I want to say I still couldn't connect to any IP mentioned on shodan.io . I saw many YouTube videos, there they pick any of the mentioned IP and connects to it but in my case I couldn't connect to any

I don't think that here is an error.

@game-lover follow the <====
elif ui[0] == "connect":
            if len(ui) < 2:
                print("Usage: connect <device>")
            else:
                target = ui[1].split(':')[0]
                print(G+"Connecting to "+target+"...")
                os.system("chmod +x core/dctl.sh && core/dctl.sh connect "+target+"")
                is_connected = os.popen("adb devices | grep "+target+"").read()
                is_offline = os.popen("adb devices | grep offline").read()
                if is_connected == "":
                    print(E+"Failed to connect to "+target+"!")
                    os.system("chmod +x core/dctl.sh && core/dctl.sh disconnect "+target+"")
                    main()
                else:
                    if is_offline == "":
                        pass      # <====
                    else:
                        print(E+"Failed to connect to "+target+"!")       # <====
                        os.system("chmod +x core/dctl.sh && core/dctl.sh disconnect "+target+"")
                        main()
                time.sleep(0.5)
                print(G+"Sending payload to "+target+"...")
                time.sleep(1)
                device = target

@samarth19 enter grep command in terminal and show output.

But, I connected to the shell

Ok. If you think that something wrong, you can modify the code.

I don't want to do pull request because you won't merge it

ok.. I need to start kali for that, wait for some minutes.

But, I connected to the shell

Ok. If you think that something wrong, you can modify the code.

I don't want to do pull request because you won't merge it

Just say whats wrong if you know.

But, I connected to the shell

Ok. If you think that something wrong, you can modify the code.

I don't want to do pull request because you won't merge it

Just say whats wrong if you know.

Why should I do it?

OK. Just you want to solve problem, if not, go out of there.

For me everything work correctly

I tried to help this person when you told that it is useless and now you says that I don't want to solve the problem.

Latest version of Ghost Framework

OK. Just if you want to solve problem, if not, go out of there.

I tried to help this user when you told me that it is useless and now you tell me that I don't want to help to solve the problem

same IP u used just now

Very strange

I dont know how to fix this

Ok no problem.. Glad that you opened this issue again tried to solve...

Why do you delete all my last messages?

Why do you delete all my messages?

will deleting @game-lover messages solve my problem? LoL

Ok no problem.. Glad that you opened this issue again and tried to solve...

I have an idea! Debug of connection in kali:
root@kali:~/ghost# adb connect <IP_ADDRESS>
* daemon not running; starting now at tcp:5037
* daemon started successfully
unable to connect to <IP_ADDRESS>:5555: Connection timed out

Maybe I should change timeout

Ok no problem.. Glad that you opened this issue again and tried to solve...

I have an idea! Debug of connection in kali:
root@kali:~/ghost# adb connect <IP_ADDRESS>
* daemon not running; starting now at tcp:5037
* daemon started successfully
unable to connect to <IP_ADDRESS>:5555: Connection timed out

Maybe I should change timeout

Same output returning when i ran this  command on my kali terminal

Try this <IP_ADDRESS>

failed

ghost> connect <IP_ADDRESS>
<IP_ADDRESS>
[*] Connecting to <IP_ADDRESS>...
<IP_ADDRESS>:5555        offline

<IP_ADDRESS>:5555        offline

[-] Failed to connect to <IP_ADDRESS>!
ghost> Traceback (most recent call last):
  File "./ghost", line 432, in <module>
    main()
  File "./ghost", line 98, in main
    main()
  File "./ghost", line 56, in main
    ui = input('\033[4mghost\033[0m> ').strip(" ")
KeyboardInterrupt

root@kali:~/ghost# adb devices
List of devices attached
<IP_ADDRESS>:5555        device

First it shows that device offline, but after this it shows that device online

@game-lover what are you think about this?

got connected by adb connect ip

Same in kali linux. In macOS everything works correctly. But in kali linux not

Yes!!! I found error.

great

I will fix it today.

ok

Problem fixed reclone and try with <IP_ADDRESS>

ok

done <IP_ADDRESS> connected

I tried IPs of shodan but still I am not able to connect to those, also I tried of my own phone and couldn't connect, I was able to connect <IP_ADDRESS> which u gave.

and i was able to connect this <IP_ADDRESS> but when i took its screenshot then it gave me something like bluestack(android emulator) was running same as like your
so i think i m not able to connect to actual android devices but virtual devices

also i was able to connect <IP_ADDRESS> and <IP_ADDRESS> and after connecting when i am taking screenshot it says it has saved the screenshot but actually nothing is saved, directory is empty

Do you have adb enabled on your phone?

I mean wireless debugging

https://youtu.be/lAvP1hl2rgQ

sorry, wireless debugging option isn't there. I thought adb would be active by turning on USB Debugging

If there is no wireless debugging option in your phone,  that means that your Android is not vulnerable.

Here one guy connects to his phone (local, not shodan):
https://youtu.be/0eAafqElwik

Can I close this issue? Problem with shodan fixed, you can connect to devices. If you can’t connect to the shodan device, that means that this device offline.

Okay you may close this issue

failed to connect ip adress game-lover plz help me

try another ip

game lover please give me another version of ghost my ghost server donot work

reinstall ghost

i have done that bro

i have done that bro

Leave It bro, This won't work, in my case too it neither it worked b4 nor it will

yes bro

[-] Failed to connect to <IP_ADDRESS>:5555!
this error coming in shodan
after some time i use to my phone and my dad it working

[-] Failed to connect to <IP_ADDRESS>:5555!
this error coming in shodan
after some time i use to my phone and my dad it working

help me

@whoamihulk reinstall Ghost Framework, I updated it

why cant i connect to my phone
with ghost framework. it says cant connect tried with default port too.
Help Please!

can anyone share older versions of ghost framework?

@devilbhai why do you need older version of ghost?

@devilbhai @thecakeisfalse Old versions of Ghost Framework are not stable because they require ADB installation.

I tried with latest version 8.0.0 but every time it says fail to connect..
Can you provide solution please?..
On Sat, 2 Oct 2021, 8:43 pm Ivan Nikolsky, @.***> wrote:

@devilbhai https://github.com/devilbhai @thecakeisfalse
https://github.com/thecakeisfalse Old versions of Ghost Framework are
not stable because they require ADB installation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/EntySec/Ghost/issues/112#issuecomment-932768363, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AI2RQ5GCNWYT6XCYOVGDWA3UE4ORFANCNFSM4NJHY7ZQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@devilbhai this is not ghost problem, try another IP

I tried almost all ip from shodan, none of them worked..
How to try with own ip?
On Sat, 2 Oct 2021, 9:37 pm Simon Chaykin, @.***> wrote:

@devilbhai https://github.com/devilbhai this is not ghost problem, try
another IP
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/EntySec/Ghost/issues/112#issuecomment-932776268, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AI2RQ5DJFXK4P2HITGEM2QLUE4U4TANCNFSM4NJHY7ZQ
.

@devilbhai #279

i have this problem

I do not appreciate that you are trying to exploit devices from the wild, you have no permission to attack them.
https://github.com/EntySec/Ghost/blob/c8b328c87b8ea71c4f191c90ab24705f3cc62cfc/TERMS_OF_SERVICE#L1-L10

please guys can you share the old version of Ghost Framework

I can't connect too, not even to my phone

#279

i install the newest one, and I can't connect to my own devices, I don't know why, I think the old versions of Ghost Framework are good because I already install ADB installation in Kali Linux @thecakeisfalse @enty8080 @samarth19

@XM1N21KR1
#279

I'm using the update version of Ghost Framework but I still get failed to connect to....... error
I have tried all IP's on Shodan and I have even tested my Android mobile but still no sign

I can't get it to connect to anything and I have gone through all the comments. Please help

I'm using the update version of Ghost Framework but I still get failed to connect to....... error I have tried all IP's on Shodan and I have even tested my Android mobile but still no sign

I think we should use other tools like Metasploit ,just make the victim
download the backdoor and social engineering

@CleverKoi can you show IP's that you tested

same here I have tried the latest version of ghost but cannot connect to any ip address even my own

@thomas9kamau99
#279


SPKLR-111: Bash script implementing an interactive tutorial

This bash script implements an interactive tutorial that helps users in
performing the first run of Spark by following the steps reported in
the Quick Start Guide.

LGTM! 👍

thanks @giuseppetotaro this looks great! @thammegowda and @karanjeets I saw +1s in email from both of you hence the merge.

Thanks @chrismattmann and @giuseppetotaro


ContentState.createFromBlockArray fails on empty array

We have an app that’s initialising a ContentState object through a block array, and we’re using the createFromBlockArray method to do this. Unfortunately it fails if the block array is empty, which you can see in this fiddle: https://jsfiddle.net/m6z0xn4r/27/
const {ContentState} = Draft;
const contentState = ContentState.createFromBlockArray([]);

The error appears to be that this line assumes that the blockMap will always have a first value. This is easy enough to work around obviously, but it feels like a rough edge that’d be nice to smooth over.

Thanks for the bug @makenosound! I agree that we should do something about this - would you be interested in putting in the fix?

@davidchang Yep, happy to look at it.

@davidchang PR there for you to have a squiz at whenever you get the chance!

thanks for the PR @makenosound ! looks great


Added to the "Misc" section a gem for Seeds

SeedMigration is a way to manage changes to seed data in a rails app in a similar way to how schema migrations are handled.

Great. Thanks. Cheers. FYI: Moved the gem to a new seeds section.


Schedule build errors should include the schedule in which the problem occurred when reporting problems

What problem does this solve or what need does it fill?
When errors are reported during schedule building, the schedule name is not included.
It would be helpful to be able to track down the exact source of the problem, especially since that information.
What solution would you like?
Currently:
2023-08-20T17:23:10.908705Z  WARN bevy_ecs::schedule::schedule: 1 pairs of systems with conflicting data access have indeterminate execution order. Consider adding `before`, `after`, or `ambiguous_with` relationships between these:
 -- update_action_state<PlayerAction> (in set Update) and ui_focus_system (in set Focus)
    conflict on: ["bevy_ui::focus::Interaction"]

In the preamble to this reporting, we should report the schedule name if it is available.
Additional context
We won't always be able to report the schedule name, since this information is stored in Schedules, not on each individual Schedule. In theory I suppose we could change that though.

I think we should change Schedule to store the name. I had a branch with the change, but it needs updating.


Per-plugin configuration files

Most of the time a plugin needs a little configuration/keymapping in order to work. I was thinking about autoloading a per-plugin configuration file, say plugin/config.vim. This would make it possible to enable/disable specific plugins without messing up the global configuration and would make the  --on feature more robust.
Example ~/.vim/plugged/vim-gitgutter/config.vim:
let g:gitgutter_max_signs = 1000

nmap ]h <Plug>GitGutterNextHunk
nmap [h <Plug>GitGutterPrevHunk

nmap <Leader>ha <Plug>GitGutterStageHunk
nmap <Leader>hu <Plug>GitGutterRevertHunk

nmap <Leader>hv <Plug>GitGutterPreviewHunk

One could go even further and auto-include a config.local.vim for computer-local configuration compatible with dotfiles, though this might be a bit overkill.

Hi, thanks for the suggestion, but I don't think the feature is crucial to vim-plug which tries to be simple and small. I suggest that you write your own function for doing that using g:plugs variable which holds all the information you need and simply call it on VimEnter event. Let me know if you need further assistance.

No problem, I get the design principle. Thanks for the tip!

How about creating a hook enabled which would get the plugin data g:plugs as an argument?
Btw, here's what I wrote for neovim:
for plugin in keys(g:plugs)
    let s:plugin_config = $HOME . '/.config/nvim/plugin.d/' . plugin . '.vim'
    if filereadable(s:plugin_config)
        execute 'source ' . s:plugin_config
    endif
endfor


Add Cast Guide and begin cast Reference

Add Cast Guide
Begin cast Reference
misc fixes

Thanks!

More soon :smile:


stxxl 1.3.1: crash after unsuccessful resize of stxxl::vector

If stxxl::vector::resize(n) throws an exception due to insufficient disk space the vector object will crash in it's destructor. Looking at the crash in a debugger I see the stack like this:
block_manager::delete_blocks(begin, end)
-> block_manager::delete_block(bid)
-> bid.is_managed() // here
and the reason for the crash is that bid.storage is null.
The problem is gone after I changed
https://github.com/stxxl/stxxl/blob/1.3.1/include/stxxl/bits/mng/mng.h#L208 line 208
from if (!bid.is_managed())
to if (!bid.valid() || !bid.is_managed())
Would be great to know if this problem is fixed in 1.4.x?

I remember one commit, 0241c7b7e52b314d3f4a5a456fe30e480a24237a, which does something with resize() but that's not about lack of disk space.
Can you write a simple test case?

I believe something like following should reproduce it:

I had it on Windows 7, MSVC 2010, x64 if it matters
in stxxl.config set one and only stxxl disk to a file on a flash drive and make sure the flash card has only few Mb of free space.
run something like the following:
//--------------- test.cpp
#include <stxxl.h>
typedef stxxl::VECTOR_GENERATOR<int, 4, 4>::result vector_type;
int main(int argc, char * argv[]) {
vector_type* vector = new vector_type(); // I remember the problem I had was with stxxl vector not bounded to a file directly. I don't know if it matters.
try {
while(true)
vector->push_back(0);
}
catch(...) {
delete vector; // here it will crash in block_manager::delete_block(bid)
}
return 0;
}

I think I fixed the problem with 465c8d963fdf58155bb9eb9f129f5ad6cb0d7843

Hello Timo,
I did not yet try to verify the problem is gone in the main branch but from
looking into your changes I believe it's fixed now. I'll let you know about
any problems when I switch to new version of stxxl or evaluate the version
from the main branch.
Thank you,
David
On Sun, Feb 15, 2015 at 9:48 AM, Timo Bingmann<EMAIL_ADDRESS>wrote:

I think I fixed the problem with 465c8d9
https://github.com/stxxl/stxxl/commit/465c8d963fdf58155bb9eb9f129f5ad6cb0d7843
—
Reply to this email directly or view it on GitHub
https://github.com/stxxl/stxxl/issues/13#issuecomment-74427784.


Peer dependency update for NextJs 11

Hi there.
Nextjs 11 came out.
Could you please add peer dependency support for the latest version.
Thanks in advance.

https://github.com/vercel/next.js/blob/canary/docs/upgrading.md

@sakkelaaksonen @justinalexandershaw 🎉  Wow thanks for the notice, I will publish it later as a new version.


Allow stateMutability 'nonpayable' in generated functions.

I ran into several contracts and calls that are not explicitly marked as pure/view but do not modify state, e.g.: https://github.com/melonproject/protocol/blob/master/src/contracts/fund/accounting/Accounting.sol#L138
Is there a compelling reason not to generate these functions? Would it break something down the line? Otherwise I think the filter is a bit too restrictive.

Actually not right. According to my colleague there actually is a state change in that call :-(

@fubhy I'm just seeing your "actually not right" comment. Was that to say we shouldn't generate methods for calling "nonpayable" functions?


Implement radioCssSel alternative for binding radios.

This PR implements an alternative to the standard radio button binding function. The new function, named radioCssSel, preserves the original structure of the page / form that you're binding the radio button on. This makes your page and its associated styles behave in a more predictable manner.

This looks awesome.  I created a sample here to try it out.
:+1: from me

Awesome, and thanks for the doc improvements! I think it's time to ship this. :tada:


Unused Project Setup in Github

Describe the bug
not exactly a bug
The project made under github projects is not being used and is there since 2019, so could we remove it all together ?
To Reproduce
Steps to reproduce the behavior:

Go to https://github.com/CircuitVerse/CircuitVerse/projects

Expected behavior
A blank project which is not being used should not exist.
Screenshots
Not Applicable.
Are you working on this issue? (Yes/No)
Can't. Admins Please.

@ankitkataria
sir kindly take this into consideration.

Can be closed @YashKumarVerma @nitin10s


mc.stop buggy behaviour

The mc.stop function only stops certain parts of the animation. I have provided examples below.

Having the ability to pause the animation is vital when you have many animations on one page and you only want to animate them when they are visible in the viewport.

Could you upload an example so you can test it?
It does not have to be the original, but an example that contains what you ask.

Ok, I am at work currently but i'll set it up asap.


Explanatory comments throughout

Add more explanatory comments, and perhaps content in README files, throughout.
Assume that the reader may be somewhat familiar with Angular but not that familiar with the techniques and use.
Point out especially the large gap between what this is meant to represent, and a very primitive functionality currently present.

I'd like to achieve decent documentation "coverage" as shown by CompoDoc.


TensorBoard doesn't display Events under Safari

I've been attempting to view events in TensorBoard, using both the mnist_with_summaries.py tutorial, and a much simpler example from the "Hello, TensorFlow!" article (example code at the bottom of this page: https://www.oreilly.com/learning/hello-tensorflow). In both cases, I can see the Graph, but nothing under Events.
Environment info
Operating System: OSX 10.11.5
Running Python 3.5.1 (installed from the DMG installer on python.org)
Installed tensorflow 0.9.0rc0 via pip3
Steps to reproduce

Paste the following code into a file:

import tensorflow as tf

x = tf.constant(1.0, name='input')
w = tf.Variable(0.8, name='weight')
y = tf.mul(w, x, name='output')
y_ = tf.constant(0.0, name='correct_value')
loss = tf.pow(y - y_, 2, name='loss')
train_step = tf.train.GradientDescentOptimizer(0.025).minimize(loss)

for value in [x, w, y, y_, loss]:
    tf.scalar_summary(value.op.name, value)

summaries = tf.merge_all_summaries()

sess = tf.Session()
summary_writer = tf.train.SummaryWriter('log_simple_stats', sess.graph)

sess.run(tf.initialize_all_variables())
for i in range(100):
    summary_writer.add_summary(sess.run(summaries), i)
    sess.run(train_step)

Run the code, then after it is complete, run "tensorboard --logdir=log_simple_stats/"
Go to localhost:6006, under Events, there are no Runs listed.
What have you tried?

Adding a flush() call to the summary writer
Copying the css and js directories under tensorboard/lib, from source (this had no effect, so I reverted the change)

Logs or other output that would be helpful
The log output looks like:
Looking in log_simple_stats reveals:
-rw-r--r--  1 jason  staff  19030 Jun 23 01:11 events.out.tfevents.1466669497.hostname.local
MD5 (events.out.tfevents.1466669497.hostname.local) = f7032e6e643bbac6b0009411a02cb8db

And the logs from tensorboard:
~ tensorboard --logdir=log_simple_stats/
WARNING:tensorflow:Found more than one graph event per run. Overwriting the graph with the newest event.
WARNING:tensorflow:IOError [Errno 2] No such file or directory: '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/tensorboard/TAG' on path /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/tensorboard/TAG
WARNING:tensorflow:Unable to read TensorBoard tag
Starting TensorBoard  on port 6006
(You can navigate to http://<IP_ADDRESS>:6006)
<IP_ADDRESS> - - [23/Jun/2016 01:11:11] "GET / HTTP/1.1" 200 -
<IP_ADDRESS> - - [23/Jun/2016 01:11:11] "GET /lib/css/global.css HTTP/1.1" 200 -
<IP_ADDRESS> - - [23/Jun/2016 01:11:11] "GET /external/d3/d3.min.js HTTP/1.1" 200 -
<IP_ADDRESS> - - [23/Jun/2016 01:11:11] "GET /external/lodash/lodash.min.js HTTP/1.1" 200 -
...

After re-reading the TensorBoard README again, I realized what the issue might be... I was using Safari instead of Chrome. Trying out Chrome 51, the Events tab displays properly now. TensorBoard broken under Safari 9.1.1, and title updated to reflect.

I think the pip package is outdated; the particular issue you describe (graphs tab works, events tab never works) is fixed in a newly-built pip package, and we will rebuild the pip package before release. However, in the local testing I'm doing, Safari is pretty spotty, I think because it doesn't play well with webcomponents/Polymer. We don't currently consider Safari a supported browser so I don't invest much in making sure that it's working. But both Chrome and FF are fine.
If you feel strongly that we should be paying more attention to Safari let me know.

I don't think missing Safari support is that big a deal (more just a nice-to-have), but it may help others if TB displayed a warning when loading inside of Safari, explaining it's not a supported browser (like a dismiss-able banner, or even on the command line if it detects a Safari user agent). I'm sure like me, others on the Mac will make the same mistake, since in the tutorials for TensorBoard there's no mention of browser incompatibilities. Even the first time I skimmed the TensorBoard README, I missed the browser compatibility warning.

Just for the record, supporting all popular browsers is a big deal and must-to-have. Now tensorboard is working in safari after the update :)
In the long run, cross-browser support should stay.


delete remnants of pkg dedup

Description
Removing bits of the stale pkg dedup feature flag
FIXES:
Type of change
What is it?

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Documentation update
[ ] Tests update
[ ] Refactor

I'll wait if you want to include the other changes here? or is this all? :)

Ah sorry missed this. Github is slow today for me. Other changes?

No worries, I thought there is more judging from #2676 but it's actually a predecesor, so this seems to be complete :+1:


Runtime error with screen/text formating

Describe the bug
I am scanning many repositories with a single command
bandit -v -ii -lll -r ./

and I get this result:

Same happens with this command:
bandit -f txt-v -ii -lll -r ./

To Reproduce
Steps to reproduce the behavior:
Not sure how to reproduce to be honest. :D
Maybe just do as I did scan a lot of repositories using the default output.
Expected behavior
Normally I would expect a normal issue report.
Bandit version

1.5.1

Additional context
macOs Mojave version 10.14.3

I installed Bandit for python3 and again I get this:

with this command:
bandit -v -ii -lll -r ./

Is this within a screen session? It seems to be some issues with unicode rendering.

I'm getting a similar issue using Git Bash on Windows 10. With Python 3.7.3 and Release 1.6.2 of bandit.
File "<me>\AppData\Roaming\Python\Python37\site-packages\bandit\core\manager.py", line 173, in output_results "%s" % (output_format, str(e)))
RuntimeError: Unable to output report using 'txt' formatter: 'charmap' codec can't encode character '\u0130' in position 155969: character maps to <undefined>

I also ran this on Ubuntu 18.04LTS (WSL) with Python 3.7.5 and it seemed to work fine.

Interestingly.... this works just fine in powershell. So, there's a workaround for anyone on Windows running into the same problem.

We will need the python code Bandit was run against in order to duplicate and resolve. At this point, I can't reproduce.

Issue Title: Bandit Skipping Directory and Unable to Output Report Error
Command Used:
dist\run_bandit.exe -r C:\repo\python\kubernetes\base\config -f json -o result.json
Output:
Running Bandit with the following parameters: Report directory: C:\repo\python\kubernetes\base\config Output format: json Output file: result.json Discovering files in directory: C:\repo\python\kubernetes\base\config Skipping directory (C:\repo\python\kubernetes\base\config), use -r flag to scan contents Running Bandit tests... Outputting results with severity level 'LOW' and confidence level 'LOW' Error during output results: Unable to output report using 'screen' formatter: 'screen'
Script Used:
`import sys
from bandit.core import manager as bandit_manager
from bandit.core import config as bandit_config
if name == "main":
# Argument parsing
report_directory = None
output_format = 'json'  # Default output format
output_file = None
# Parse arguments
args = sys.argv[1:]
for i in range(len(args)):
    if args[i] == '-r':
        report_directory = args[i + 1]
    elif args[i] == '-f':
        output_format = args[i + 1]
    elif args[i] == '-o':
        output_file = args[i + 1]

# Ensure required arguments are provided
if not report_directory:
    print("Error: Missing required '-r' argument for directory")
    sys.exit(1)

# Print the command-line parameters for debugging
print(f"Running Bandit with the following parameters:")
print(f"Report directory: {report_directory}")
print(f"Output format: {output_format}")
print(f"Output file: {output_file if output_file else 'Not specified'}")

# Load Bandit configuration
config = bandit_config.BanditConfig()

# Initialize Bandit manager
b_mgr = bandit_manager.BanditManager(config, output_format)

# Discover files and run tests
print(f"Discovering files in directory: {report_directory}")
b_mgr.discover_files([report_directory])
if b_mgr.results_count == 0:
    print(f"No Python files found in '{report_directory}'. Please check the directory.")
    sys.exit(1)

print("Running Bandit tests...")
b_mgr.run_tests()

# Generate the report
lines = []  # Since the results will be written to the output file, we leave this empty
sev_level = 'LOW'  # Severity level (LOW, MEDIUM, HIGH)
conf_level = 'LOW'  # Confidence level (LOW, MEDIUM, HIGH)

# Output results to the specified file or to console if no file is specified
print(f"Outputting results with severity level '{sev_level}' and confidence level '{conf_level}'")

try:
    b_mgr.output_results(lines, sev_level, conf_level, output_file, output_format)
except Exception as e:
    print(f"Error during output results: {e}")
    sys.exit(1)

# Exit with Bandit result code
print(f"Bandit completed with {b_mgr.results_count} findings.")
sys.exit(b_mgr.results_count)`

PyInstaller Command Used:
pyinstaller --onefile --hidden-import=bandit.core.manager --hidden-import=stevedore.extension run_bandit.py


Fee and amount

The dollar amount should always be rounded to two decimals
The sats should always be in full numbers
Custom fee entry should be in whole numbers, not decimals

We would need to allow for that in order to support #1972

-Verified this issue on dev app v1.8.0(304)


Merging substitution lists returns "unhashable type" Type error

Not a critical issue for me because I came across the error by accident, but it seems that substitutions are not compatible with the current model composition framework. Just something to bear in mind for the refactor I suppose.
# coding=utf-8
from gpkit import Model, Variable, SignomialsEnabled, units
import numpy as np
import numpy.testing as npt
from gpjet.aircraft.vtail import VerticalTail
from gpjet.aircraft.fuselage import Fuselage
from gpjet.aircraft.landing_gear import LandingGear

class Aircraft(Model):
    """
    Combined fuselage, tail, and landing gear model
    """

    def setup(self):

        with SignomialsEnabled():
            vt = VerticalTail()
            fu = Fuselage()
            lg = LandingGear()

            # Need to initialize solve with solution of uncoupled models
            vtfu = vt & fu
            vtfu.cost = vt.cost + fu.cost
            vtfu.substitutions.update({'W_{lg}': 1000, 'x_{CG_{lg}}': 15})
            vtfu_sol = vtfu.localsolve(verbosity=0)

            lg.substitutions.update({'x_{CG_{lg}}': 15, 'x_{CG}': 15})
            lg_sol = lg.localsolve(verbosity=0)

            init = vtfu_sol['variables'].copy()
            init.update(lg_sol['variables'])

            aircraft = vt & fu & lg
            aircraft.cost = vt.cost + fu.cost + 0.5*lg.cost

            # HACK to update the init dict to recognize shared variables
            init2 = {}
            varsbyname = aircraft.varsbyname
            for key, value in init.items():
               if key.name in varsbyname:
                   newkey = varsbyname[key]
                   init2[newkey] = value

            aircraft.localsolve(x0=init2, verbosity=5)

        return aircraft

if __name__ == "__main__":
    Aircraft()

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/Users/philippekirschen/Documents/MIT/Research/GPjet/gpjet/aircraft/aircraft.py in <module>()
     50
     51 if __name__ == "__main__":
---> 52     Aircraft()#.test()
     53

/Users/philippekirschen/Documents/MIT/Research/GPkit/gpkit/gpkit/model.pyc in __init__(self, cost, constraints, substitutions, *args, **kwargs)
     84                 extended_args.extend(args)
     85                 name = kwargs.pop("name", self.__class__.__name__)
---> 86                 setup = self.setup(*extended_args, **kwargs)
     87             except:
     88                 print("The 'setup' method of this model had an error.")

/Users/philippekirschen/Documents/MIT/Research/GPjet/gpjet/aircraft/aircraft.py in setup(self)
     31             init.update(lg_sol['variables'])
     32
---> 33             aircraft = vt & fu & lg
     34             aircraft.cost = vt.cost + fu.cost + 0.5*lg.cost
     35

/Users/philippekirschen/Documents/MIT/Research/GPkit/gpkit/gpkit/model.pyc in __and__(self, other)
    152
    153     def __and__(self, other):
--> 154         return self.merge(other)
    155
    156     def __getitem__(self, item):

/Users/philippekirschen/Documents/MIT/Research/GPkit/gpkit/gpkit/model.pyc in merge(self, other, excluded)
    194         return Model(self.cost,
    195                      self.constraints + other.constraints,
--> 196                      substitutions)
    197
    198     def concat(self, other):

/Users/philippekirschen/Documents/MIT/Research/GPkit/gpkit/gpkit/model.pyc in __init__(self, cost, constraints, substitutions, *args, **kwargs)
    113             if isinstance(key, Strings):
    114                 del self.substitutions[key]
--> 115                 self.substitutions[self[key]] = value
    116
    117         if isobjectmodel:

TypeError: unhashable type: 'list'

Fixed in refactor :)


[2.6.1.post1] Provide wheels for Python 3.9+

I have been using pyproj==2.6.1.post for quite some time. I've been unable to update to 3.x due to algorithm changes which affect some sensible models in my project. I've recently started updating my project to Python 3.9.x, but version 2.6.1.post of pyproj does not have a compatible wheel on PyPI: https://pypi.org/project/pyproj/2.6.1.post1/#files. Wheels are distributed only up to Python 3.8. Thus I'm forced to use a source install, and that makes me need to manage my own PROJ version. I'd like to eliminate that to ensure correctness.
Installation method/steps

Installation method (conda, pip wheel, from source, etc...)
using pip, from source because Python >= 3.9
How did you install PROJ? Where is it installed?
See below
Please provide all commands/steps you used to install pyproj and PROJ.

(Linux, CentOS7 production server)
yum install -y proj  <----- due to CentOS7, epel-release only has proj-4.8.0 available (see https://pubmirror1.math.uh.edu/fedora-buffet/epel/7/x86_64/Packages/p/proj-4.8.0-4.el7.x86_64.rpm).
But pyproj==2.6.1.post1 wheels came distributed with PROJ 7.2.0.
Thus it's impossible for me to reproduce the same build without a wheel on CentOS7
(Mac OS, local machine)
conda install -y proj==8.2.1 <----- I'm also weary of taking a newer PROJ version since my project is highly sensitive to massive performance slowdowns that we've experienced in the past (see https://github.com/pyproj4/pyproj/issues/827)
pip install pyproj==2.6.1.post
Environment Information

pyproj version you are attempting to install

PROJ version (Execute proj command and give version here.)
8.2.1

Python version (python -c "import sys; print(sys.version.replace('\n', ' '))")
3.9.10

Operation System Information (python -c "import platform; print(platform.platform())")
Linux CentOS 7:  3.9.10 (main, Feb  3 2022, 05:53:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Mac OS: 3.9.7 (default, Sep 16 2021, 08:50:36)  [Clang 10.0.0 ]

P.S. In case you're wondering why I'm mixing conda and pip, it's because I only use conda for local development and easy installation of certain packages that I can't install from PyPI. Otherwise I use pip.

pyproj doesn't do historical wheel build updates. It is maintained on a volunteer basis so only the latest version is supported.
Current options:

You can install PROJ from source (as you currently are doing)
You can investigate what the differences are between the versions and figure out why they occur. This can help pyproj/PROJ fix any issues if there are any and/or it could be a learning opportunity for why things changed.


Update Azure restoration process to support multiple authentication methods

See src/and-cli-restore-azure-storage.ts.  Currently, this aspect only supports authentication via a means of passing in an already generated SAS token.  This is not ideal because this forces the SAS token to be generated up front for a very long period of time (lifetime of product).  SAS tokens are required for interacting with blob storage using azcopy.  Suggest adding in support to use az cli to generate SAS using https://docs.microsoft.com/en-us/cli/azure/storage/container?view=azure-cli-latest#az_storage_container_generate_sas by first authenticating using az in some other manner (service principle, username, etc...)

Took a quick look at this and ran into issues when generating SAS tokens and attempting to use those SAS tokens when authenticating azcopy requests.  For clarity, the current SAS tokens being used in the currently supported functionality is an account level SAS token that have an expiration date that can be set to any time in the future without limitation (100 years from now for instance).  When generating them using Azure AD, it creates user SAS tokens that have a 7 day in the future expiration date limit.

Took a quick look at this and ran into issues when generating SAS tokens and attempting to use those SAS tokens when authenticating azcopy requests.  For clarity, the current SAS tokens being used in the currently supported functionality is an account level SAS token that have an expiration date that can be set to any time in the future without limitation (100 years from now for instance).  When generating them using Azure AD, it creates user SAS tokens that have a 7 day in the future expiration date limit.


Scanner set_num_max_rows ???

Docs say:

Sets the maximum number of rows to scan per call to hb_scanner_next().

Does this imply I need to call scanner next repeatedly? My unit tests don't seem to require this behavior. The sample code set this value to 1, as have I...

http://tsunanet.net/~tsuna/asynchbase/api/org/hbase/async/Scanner.html#setMaxNumRows(int)
http://tsunanet.net/~tsuna/asynchbase/api/constant-values.html#org.hbase.async.Scanner.DEFAULT_MAX_NUM_ROWS
// After some playing around, it appears to me that the difference between 1 and 100 is really significant.
// However, the difference between 100 and 1000 doesn't seem much different.
// The difference between 1000 and 1 million isn't even apparent.


python27Packages.gmusicapi: 12.1.1 -> 13.0.0

Semi-automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python2.7-gmusicapi/versions.
meta.description for python27Packages.gmusicapi is: "An unofficial API for Google Play Music"
meta.homepage for python27Packages.gmusicapi is: "https://pypi.python.org/pypi/gmusicapi/"
Updates performed:

Version update
Quoted meta.homepage for RFC 45

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 13.0.0 with grep in /nix/store/xjinq47m04r07spf2dyysj2lda16514p-python2.7-gmusicapi-13.0.0

directory tree listing: https://gist.github.com/35b609c2827b6ddc3c066e69d4218175

du listing: https://gist.github.com/529c3b79432377f981abdf37b1138b00

Rebuild report (if merged into master) (click to expand)

15 total rebuild path(s)
4 package rebuild(s)
4 x86_64-linux rebuild(s)
4 i686-linux rebuild(s)
3 x86_64-darwin rebuild(s)
4 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
beets
python27Packages.gmusicapi
python37Packages.gmusicapi
python38Packages.gmusicapi

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/xjinq47m04r07spf2dyysj2lda16514p-python2.7-gmusicapi-13.0.0 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python27Packages.gmusicapi https://github.com/r-ryantm/nixpkgs/archive/165a5c5853c1e28f3fddb90d1d54de669edebf95.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/xjinq47m04r07spf2dyysj2lda16514p-python2.7-gmusicapi-13.0.0
ls -la /nix/store/xjinq47m04r07spf2dyysj2lda16514p-python2.7-gmusicapi-13.0.0/bin

Result of nixpkgs-review pr 84915 1

1 package failed to build:

mopidy-gmusic

4 package built:

beets
python27Packages.gmusicapi
python37Packages.gmusicapi
python38Packages.gmusicapi

Also looks like they dropped python27 support in 13.0.0 according to https://pypi.org/project/gmusicapi/


feat(other): e2e authentication tests

🍰 Pullrequest

Issues

fixes #713

 AssertionError: Timed out retrying after 4000ms: Expected to find element:button[type="submit"], but never found it.

This is assertion relates to the confirm consent agreement step, which still is in the current Authentik DB in master.


how automatically fill  card element

When making payments, with Element created, how do I automatically fill in the card number, CVC, EXP, or does Stripe provide a way to choose between different credit cards to pay for? I hope you can help me solve it

Like this demo,how to fill card info?
https://stripe.com/docs/payments/integration-builder

Hi @xiaozhou-amazing,
You can pre-fill Element values when creating or updating an Element, via the value option.
For future reference, this issue tracker is for bugs related to the @stripe/stripe-js package. Please direct support requests to Stripe Support.


test(js): remove snapshots

Removes all snapshot testing
Adds a linting rule that disallows snapshot testing
Adds a linting rule that breaks the build if .only is used (don't worry you can still run and pass the tests locally)

thanks for removing all of those render snapshots! we can update clockface now!


Can't compile scnlib/2.0.0 on MSVC

Thank you for releasing version 2.0.0!
When I tried to update the conan recipe, I got a compilation errors only with MSVC 19.37.32824.0.
(gcc, clang and apple-clang work fine).
Wolud you help me to solve this problem?
src\scn\vscan.cpp(401,67): error C2440: 'initializing': cannot convert from 'initializer list' to 'scn::v2::detail::specs_checker<scn::v2::`anonymous-namespace'::specs_handler<scn::v2::basic_scan_context<wchar_t>>>' [b\build\scn.vcxproj]
src\scn\vscan.cpp(401,67): message : No constructor could take the source type, or constructor overload resolution was ambiguous [b\build\scn.vcxproj]
src\scn\vscan.cpp(384,22): message : while compiling class template member function 'const wchar_t *scn::v2::`anonymous-namespace'::format_handler<false,CharT>::on_format_specs(size_t,const wchar_t *,const wchar_t *)' [b\build\scn.vcxproj]
          with
          [
              CharT=wchar_t
          ]
include\scn/detail/format_string_parser.h(909,19): message : see the first reference to 'scn::v2::`anonymous-namespace'::format_handler<false,CharT>::on_format_specs' in 'scn::v2::detail::parse_replacement_field' [b\build\scn.vcxproj]
          with
          [
              CharT=wchar_t
          ] (compiling source file src\scn\vscan.cpp)
src\scn\vscan.cpp(491,52): message : see reference to class template instantiation 'scn::v2::`anonymous-namespace'::format_handler<false,CharT>' being compiled [b\build\scn.vcxproj]
          with
          [
              CharT=wchar_t
          ]
src\scn\vscan.cpp(570,14): message : see reference to function template instantiation 'scn::v2::scan_expected<ptrdiff_t> scn::v2::`anonymous-namespace'::vscan_internal<wchar_t>(scn::v2::detail::basic_scan_buffer<wchar_t> &,std::basic_string_view<wchar_t,std::char_traits<wchar_t>>,scn::v2::basic_scan_args<scn::v2::wscan_context>,scn::v2::detail::locale_ref)' being compiled [b\build\scn.vcxproj]

I was having trouble with MSVC too but I was able to fix it by linking with simdutf.lib AND scn.lib
I thought it would only need scn.lib but it needed both

The reply is correct. The library currently depends on simdutf. This is handled transparently when using CMake. If not, the necessary additional linking is also documented here: https://www.scnlib.dev/latest/index.html#main-without-cmake.

@eliaskosunen the reply is correct, but not relevant for this issue. This issue appears during building scnlib, and simdutf is present. Also, in this specific case, building with C++20 with no other changes works, while C++17 fails. There is also a warning STL4038: The contents of  are available only with C++23 or later. right before the error.
Further testing shows that this only happens when SCN_USE_EXTERNAL_FAST_FLOAT is set to True.

I'm unable to reproduce this locally (2022 17.9 = 19.39) and on CI (2022 17.8 = 19.38, and 2019 16.11 = 19.29). Thus, keeping this as WONTFIX, as I have no way of verifying a patch. Given how this works on VS 2019, it sounds like a version-specific compiler bug. Patches are nevertheless welcome.


Enable multiple runs on a replay node

Enable a replay to pick up a job, process it, clean out state, and pick up a new job and process it. This is needed because some jobs will take longer than others, and we want to leverage all our compute power if there are any jobs WAITING_4_WORKER

fixed by added cleanup to start of start-nodeos-run-replay.sh


Create and Delete BYOCAdminAccess role per cluster

This PR alters the creation of the BYOCAdminAccess role to match osdManagedAdmin and osdManagedAdminSRE users creation to be unique per cluster/accountclaim.

/retest

The gofmt -s from make docker-build is fighting the gofmt -s from make. Trying to reconcile them

/hold

I checked this PR and the workflow LGTM, I +1 merging it after addressing the question added above.

@fahlmant I'm +1 to merging it, please do it when you can.

/lgtm

/hold cancel

/hold

/hold cancel


Synthesize and share branding workshop findings

User story
As a user, I want to clearly understand ReportStream and how it meets my needs.
Background & context
The brand workshop brought together SMEs and stakeholders to start work defining what we need to form messaging and tone for ReportSteam and begin to create alignment across the product. After gathering their input, we need to make detailed application plans.
Open questions

If there will need to be further meetings before creating a draft of messaging and tone

Working links
Workshop 1 deck
Workshop 2 deck
##Acceptance criteria

[x] - Summary of workshop and next steps shared with design team and meeting attendees
[ ] - Brief summary shared in all teams sync
[x] - Detailed tickets created for each artifact

@audreykwr fill out

Follow up tickets:
https://app.zenhub.com/workspaces/web-experience-607d9d5e68b95200150fec37/issues/gh/cdcgov/prime-reportstream/9481
https://app.zenhub.com/workspaces/web-experience-607d9d5e68b95200150fec37/issues/gh/cdcgov/prime-reportstream/9482
https://app.zenhub.com/workspaces/web-experience-607d9d5e68b95200150fec37/issues/gh/cdcgov/prime-reportstream/9483
These are all good candidates to break down sub steps into a couple tickets but I wanted to get these created for now. As I get started on things this sprint it will be easier to tell what steps to break out without having to make a ton of tickets right now.
@lizzieamanning

Going to share at the next all teams sync but closing now because that is planned now.


Android DatePicker implementation doesn't take into account YearRange

Describe the bug
A clear and concise description of what the bug is.
Compose multiplatform datepicker does not respect allowed year range when consuming the android artifact form an android app.
It works as expected when testing it in the library but behaves differently when consuming it from an android app.
i've noticed that this also happens with things like colors and paddings, sometimes it works fine from the multiplatform project library, but behaves differently when consuming the actual component.
Affected platforms

[ ] Desktop (Windows, Linux, macOS)
[ ] iOS
[ ] Web (K/Wasm) - Canvas based API
[ ] Web (K/JS) - Canvas based API
[ ] Web (K/JS) - HTML library

Versions

Kotlin version*:
Compose Multiplatform version*:
OS version(s)* (required for Desktop and iOS issues):
OS architecture (x86 or arm64):
Device (model or simulator for iOS issues):
JDK (for desktop issues):

To Reproduce
Steps and/or the code snippet to reproduce the behavior:
create a custom Datepicker for a Multiplatform library that allows you to pass the year range as a parameter
consume the component from an android device
Observe that the allowed year range is not detected and goes to default

Go to '...'
Click on '...'
Scroll down to '...'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

Please, create the issue in the Jetpack Compose tracker: https://issuetracker.google.com/issues/new?component=612128. The Android target is maintained there. Also, better to describe the issue there in more detail, with a code snippet, steps, actual and expected behaviour.

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


Update index.md

label 2 returns 0, so this looks like a typo

Thanks, looks like the CFG got simplified at some point. The reference to br 3 will also need updating.

done

merge?

:+1: Thanks!


Update im2rec.py

correct args.shuffle check. It is str but compared with bool.

i think it has already been fixed.


Update php version and dependencies

Hello,
I have been using this package a long time for production projects and it is great.
Will someone continue to maintain it? Maybe not new features but making a release with upgraded php version to 7 or 7.1 and upgrading the composer dependencies since the last time they were updated was 2 years ago.... Do you still accept PRs?
Thanks :)

I also care about this issue.

The project is not maintained anymore as you can see in the README. The only option you have is to fork it and do it yourself.

@vladetd, thank you for your reply.
I see that: It's game over. The only way is to fork project and do myself :cry:.


Breaks hide lines feature of mdbook

mdbook provide a feature to hide some line from code block. As explained here . I am trying to use mdbook-repl preprocessor to have some javascript example in my book. But mdbook-repl is making the code line visible.
book.toml
[book]
authors = []
language = "en"
multilingual = false
src = "src"
title = "Javascript"

[preprocessor.repl]
# iframe url
src = "https://mr-addict.github.io/mdbook-repl/embed/"

# enable javascript repl and lazy loading
javascript.enable = true
javascript.loading = "lazy"

[output.html.code.hidelines]
javascript = "~"

markdown from chapter
~const somefunction = () => {
    console.log(3 + 4);
~}

Expected view(this is without javascript.enable = true)

Actual view(with javascript.enable = true)

Thank you for your feedback. I'm glad that my project helps you.
I don't know this mdbook trick before. However I don't know that is it actually necessary to include this feature. Because you can just remove these lines in your codeblock rather than using a prefix to hide it.
I'll take a consideration and do some experiments. Tell me if you do need this feature, I can create a new release based for it.

Yes this feature is quite useful. At multiple places I want to hide some code and only keep an important section of code visible to the reader. This use case usually occur when showing some incremental changes for a function.
At each step reader need to see code running. If some part is removed from code block, it may not run as aspected.

Okay then I'll create a new release about it.
Feel free to tell me if you have any other questions or suggestions.

I have create a new release about it, you can check it out here.

Thanks for the feature.


Snowflake data loader example

This is the first of several Observable Framework examples that demonstrate data loaders for specific data sources. When appropriately configured, it will produce an output like this:

For Snowflake, I’ve included a small wrapper library that makes it easier to manage connections.

Merged into #1306.


Add example for collapsing fields using custom FieldTemplate

Reasons for making this change
The current documentation contains a call for an example of collapsing fields in a form. This PR adds such an example, using a custom FieldTemplate.
This relates to #268, and hopefully resolves #598 -- the example I've linked doesn't show it, but I currently have also implemented an "Expand / Hide All" button using the React state of the component housing the <Form> component and the formContext object that's used in the linked example.
Checklist

[X] I'm updating documentation

[X] I've checked the rendering of the Markdown text I've added

[ ] I'm adding or updating code

[ ] I've added and/or updated tests
[ ] I've updated docs if needed
[ ] I've run npm run cs-format on my branch to conform my code to prettier coding style

[ ] I'm adding a new feature

[ ] I've updated the playground with an example use of the feature

Thank you very much!

In the future, it might be nice to add this behavior into the library itself by adding an attribute collapsible under ui:options.

That sounds good to me, too! I may do some work on that if/when I have the time in the next few weeks.


[Docs Missing] docs.docarray.org -> There isn't a GitHub Pages site here.

Initial Checks

[ ] I have read and followed the docs and still think this is a bug

Description
When i try to read docs, i got 404 pages
Example Code
No response
Python, DocArray & OS Version
FireFox

Affected Components

[X] Vector Database / Index
[X] Representing
[X] Sending
[X] storing
[X] multi modal data type

fixed


Enhancement: Ability to delete agents

At present, there is no way to delete agents in SuperAGI. This can lead to clutter, especially when many agents are created for testing or experimentation purposes. Implementing a delete function would allow for better management of agents and a cleaner, more organized workspace.
I did notice that another issue was created earlier on this topic (https://github.com/TransformerOptimus/SuperAGI/issues/473) but that seems to have been closed a bit prematurely, as the latest build from the main branch does not exhibit this functionality yet.

@Arkajit-Datta is currently working on this.

Looks like the original issue https://github.com/TransformerOptimus/SuperAGI/issues/473 has been re-opened; I'm closing this one as a duplicate.


Update package.js API to be compatible with meteor > 2.3

https://github.com/meteor-useraccounts/unstyled/pull/7

Thank you.


Support Auth extension

It would be great to have authentication support in stac-cli, just like stac-browser is doing with https://github.com/radiantearth/stac-browser/issues/81 and https://github.com/radiantearth/stac-browser/blob/main/docs/options.md#authconfig
For example, to access an API Key protected STAC instance, I'd like to do something that would like this:
stac search --auth-type=apiKey --auth-in=header --auth-name=x-api-key <HREF>

For this example:
stac search --auth-type=apiKey --auth-in=header --auth-name=x-api-key <HREF>

How would you want to supply to key itself? Environment variable?

I would be fine with any solution. I could imagine passing it on the command line, use an environment variable, or having to enter it interactively in the terminal.


Release 0.16.0

/cc @froddd @edds

Diff looks straight-forward: https://github.com/alphagov/govuk_template/compare/v0.15.1...release_0-16-0
I looks like django is missing from the packaging section of the README, and i'm not sure if it'll appear in the gh-pages doc either. If we're adding a new templating language those should probably be updated.

Added Django to readme in https://github.com/alphagov/govuk_template/pull/179

I think this is good to merge :+1:
@froddd could you raise a PR on the gh-pages branch, to add it there too? Thats the only remaining thing I think.


Implementation] text field set attribute() api methods

Closing PR as a more in-depth review of this control will address these changes.


Fix ctr run bug when snapshotter is provided

Snapshotters for run must be created with requested snapshotter. The order of the options is important to ensure that the snapshotter is set before the snapshots are created.
The bug caused the run to fail due to the snapshotter not being found, subsequent runs would fail to create the snapshot since it already existed. ctr snapshot ls showed the snapshots were being created with the wrong snapshotter.

Codecov Report

Merging #1293 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1293   +/-   ##
=======================================
  Coverage   23.36%   23.36%
=======================================
  Files          40       40
  Lines        4579     4579
=======================================
  Hits         1070     1070
  Misses       3307     3307
  Partials      202      202

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 6c1a04f...5a74a46. Read the comment docs.

I can see this becoming a common mistake. Should require a snapshotter to always be provided?
And maybe adding a WithDefaultSnapshotter ?

@mlaventure I agree, we can better mitigate these issues by providing a client level option.

Can all be part of a different PR though.
LGTM

LGTM


Feature Request: CountingGauge

For Gauges that are logically counters, Spectator doesn't have an API for expressing these.    I would like to request either a) a new type that expresses this use, or b) extend the existing Gauge API to support it.  Several alternatives were proposed to work around this, but they all have their own faults, which is why I believe the correct place to fix it is in Spectator itself.
A counter is a type where the value starts at 0, and goes up by integer amounts.  A gauge is a type where the value starts at NaN, and can be set to any floating point amount.    What I need is partly a counter, partly a gauge.    The use case is keeping track of the number of active connections on a machine, which is an integral quantity, starts at 0, and can go up or down.  On the surface, this seems trivial to implement with a PolledMeter. It gets much more complicated when tags are associated, and the Id is dynamic.
Alternatives Considered
Use PolledMeter and keep track of the counts myself.
This approach says to use my own AtomicLong to keep track of counts, and use PolledMeter to track the values.   To implement this correctly, I would need to maintain my own ConcurrentMap of (Registry, Id) to AtomicLong, and increment them accordingly.  The problem here is that Registries do not have a well defined equality , so it is risky to use this as a key value in the map.  Registries do not claim they use instance identity, or that the hashCode is constant.    This makes it unsuitable as a map key.   Using just the the Id instead is almost workable, but it means keeping the registry around, rather than being able to pass it in as a param.   Lastly, considering that Registry is already maintaining this map, it doesn't make sense to make users do it too.
PolledMeter has a second weakness in that it lazily checks the value of the meter.  In a unit test, it is reasonable to get the meter from the registry, and check that value has been incremented.   When using PolledMeter, the update is delayed, forcing the test to either: a) block at the end until it notices the counter has been updated b) implement a custom Executor for the test that updates values immediately. c) Skip checking the registry and look at the Id->AtomicLong map.   All three are less than optimal and push burden onto the user.
Use Gauge API, and use set(value() + 1).
The idea here is to use the existing API, and call set() with the previous value plus the difference.    This solution also works, but it forces additional burden on the caller.    When creating a gauge for the first time, the initial value is NaN, which means it cannot be incremented.    The initial value needs to be set to 0 if the previous value is NaN.  Secondly, writing the value after reading it is racy, which means that synchronization needs to be involved to ensure that the gauge is updated safely.  In a multithreaded program, including these locks increases the risk of blocking, and adds additional boilerplate to the code.  The operation is logically a compareAndSwap (or getAndAdd), which means that using locks is overkill for the operation.
Implement a custom Gauge, rather than a whole new Type in Spectator.
A third way would be to implement the functionality I need, implementing the Gauge interface.  The problem here is that registering my custom type with the registry is unnecessarily difficult.  Registry provides a nice property that asking for the same Id will always return the same Meter.   When creating my own type, this is no longer true, because there is no deduplication of the Ids to Meters.    The user has to create a new gauge every time, attempt to call register(), and hope that the meter doesn't overwrite the previous one.  (and from reading the code, it's not even clear this would work, since the meter state is the same, but the Meter itself is different.
An alternative to this would be managing the meter state directly from the registry using the state() function, but this again is unnecessarily verbose.    It's a ton of boilerplate for what amounts to an getAndAdd.
Use DistributionSummary.
DistributionSummary (DS) is also proposed as an alternative, based on the claim that the values can be made lower.   This has multiple issues as well.   First, the value being measured, (e.g. active connections), is not a distribution.   It wouldn't make sense to record this with a PercentileDistribution for instance.    There is a fixed, known quantity at any given point in time, unlike a distribution.   Second, DS only allows positive values, meaning that the meter cannot be decremented when a connection closes (see DefaultDistributionSummary.record).   Instead, it is the responsibility of the caller to keep track of the actual counts, which is now the same as the polled meter case.   Third, even if this was a workable solution, distribution adds tags to recorded meter called count.  This name is confusing, because the meter name is already a count (like conn.active.count).   The tag is not a count of the connections, but the count of how many times it has been called.   This is needlessly confusing, and a user looking at the metrics in a UI would need to remember this peculiarity.
Proposed Alternative
Any non-negative integer gauge would be able to benefit from a proper CountingGauge type.   Things like number of active requests, number of active threads, number of connections, number of elements in a queue.  All of these would benefit from a type that can express their semantics.    It would also be possible to add a compareAndSwap method to Gauge; the issue here is that the default value is difficult to set.   (CAS(NaN, newValue) ?)   Also, the existing gauge never claims what the default value is; this is something a new datatype would be able to express.

A sample of the code that would use this: https://github.com/Netflix/zuul/pull/955

A followup to this: I had tried to work around this issuer by synchronizing on the gauge returned by spectator, but this doesn't work.    The returned Gauge object is a wrapper, rather than the true object.   This means locking on it provides no threadsafety.  Any threadsafe actions need to be implement in Spectator itself.

A followup ping on this.   My work around for this has been using a synchronized block to enforce invariants about the gauge, but this breaks down when the gauge is a NoopGauge.   It discards all writes, and always returns NaN, which breaks my checking.     Since NoopGauge is package private, it is unnecessarily difficult to work around it in tests.
See: https://github.com/Netflix/zuul/pull/989

It has been busy recently so haven't had much time to look at Spectator stuff. Reading through the original description here are my thoughts:

For Gauges that are logically counters

Spectator has a counter type that is used for tracking a rate of change and is different than what you are describing. To avoid overloading the term I'm going to refer to the notion you are describing as a tally gauge for now.

Use PolledMeter and keep track of the counts myself.

This would be the recommended way currently if you really wanted it to be a gauge. Not sure I follow the desire to keep the registry as a key, though I would agree it is not a good candidate for use a map key. It seems like you could just create a simple class something like:
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Registry;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong;

public final class TallyGauges {

  private final Registry registry;
  private final ConcurrentHashMap<Id, AtomicLong> gauges;

  public TallyGauges(Registry registry) {
    this.registry = registry;
    this.gauges = new ConcurrentHashMap<>();
  }

  public AtomicLong get(Id id) {
    return gauges.computeIfAbsent(id, this::createAndRegister);
  }

  private AtomicLong createAndRegister(Id id) {
    return PolledMeter.using(registry)
        .withId(id)
        .monitorValue(new AtomicLong());
  }

  public void remove(Id id) {
    gauges.remove(id);
    PolledMeter.remove(registry, id);
  }

  public void increment(Id id) {
    get(id).incrementAndGet();
  }

  public void decrement(Id id) {
    get(id).decrementAndGet();
  }
}

Regarding testing, you can use PolledMeter.update(registry) to force an update in tests. Something like:
import com.netflix.spectator.api.DefaultRegistry;
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Registry;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class TallyGaugesSuite {

  private Registry registry;
  private TallyGauges gauges;

  @BeforeEach
  public void before() {
    registry = new DefaultRegistry();
    gauges = new TallyGauges(registry);
  }

  private void checkGaugeValue(Id id, double expected) {
    PolledMeter.update(registry); // force update of polled gauges
    Assertions.assertEquals(expected, registry.gauge(id).value(), 1e-12);
  }

  @Test
  public void incrementCreatesGauge() {
    Id id = registry.createId("test");
    checkGaugeValue(id, Double.NaN); // doesn't exist yet
    gauges.increment(id);
    checkGaugeValue(id, 1.0);
  }

  @Test
  public void incrementIncreasesTheValue() {
    Id id = registry.createId("test");
    gauges.increment(id);
    gauges.increment(id);
    gauges.increment(id);
    checkGaugeValue(id, 3.0);
  }

  @Test
  public void decrementReducesTheValue() {
    Id id = registry.createId("test");
    gauges.increment(id);
    gauges.increment(id);
    gauges.increment(id);

    gauges.decrement(id);
    checkGaugeValue(id, 2.0);
  }
}

This also gives you full flexibility to use whatever operations on AtomicLong or other concurrent types you want. Similarly you could put in restrictions that make sense for your usage like preventing it from being negative. However, you will need to manage the lifecycle carefully if there is churn on these values and ensure they get removed so it is not a memory leak in your application.

Use Gauge API, and use set(value() + 1).

I wouldn't recommend this approach and as far as I know we don't suggest it anywhere. Gauge is intended to be set to a known value.

Implement a custom Gauge, rather than a whole new Type in Spectator.

Generally we don't recommend implementing custom meters. Just use the basic types (counter, gauge, distribution summary, and timer) as building blocks for other patterns. PolledMeter is an example that we provide.

Use DistributionSummary.

For the use-cases like a busy queue or possibly active connections, this is often more useful than a gauge would be and I would disagree with your assertion that tracking them as distributions is inappropriate. If the measurement will vary frequently (many times per minute), then using a distribution summary allows you to see variance within the sampling interval. For example, lets say that within the step interval we update a distribution summary after inserting into a queue and it has the following updates:
1, 2, 3, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 5, 2
A gauge will get sampled and some value between 0 and 10 would be reported depending on when that happened and what the value was at that time. The distribution summary would allow you to see the number of inserts per second, average size of the queue during the step interval, and max size of the queue during the step interval. It does report a statistic=count, but in most cases users do not need to look at statistic. The UI will handle that for you when choosing an aggregation to use. Given distribution summaries are standard types recognized by the UI, I don't see that as a big source of confusion for users.
The main down sides I'm aware of for using distribution summaries are:

They only reflect the activity within a given interval and reset on interval boundaries. In the queue example where frequent updates are expected that is fine, but if no updates were made for a while then the distribution summary would report 0 in intervals where no update was recorded. That doesn't mean the queue is empty, but that it hasn't been updated.
It requires being able to tap into each update or change which isn't always possible. In some cases polling something to get the size at given instant is the only access that is available.

Proposed Alternative

We could potentially have some sort of TallyGauge pattern, but I'm not fully convinced it should be a core type. I'm pretty busy right now with other commitments so not sure when I'll have the time to devote to it. Hopefully something like the TallyGauges example above will work for now. In my opinion that is a better option than the gauge locking stuff you are doing right now.

Thanks for the response.   Replies inline:

This would be the recommended way currently if you really wanted it to be a gauge.

I feel like PolledMeter is used as the kitchen sink of gauges.   It's used for anything that doesn't fit into the pre defined types.   You are right that it is probably the best way now to accomplish what I want, but that isn't what this issue is about.  (Phrased differently: PolledMeter is always the recommended way to do anything that encounters an API deficiency).  Instead, I am asking about slicing out a new pattern from the PolledMeter catchall.

Regarding testing, you can use PolledMeter.update(registry) to force an update in tests. Something like:

Thanks for this, I didn't realize this method existed.

Generally we don't recommend implementing custom meters.

This is not at all obvious from the Javadoc.  I think you should call this out explicitly, and in the place most readily visible to users.

It seems like you could just create a simple class something like:

I called out why this is not possible.   There may be multiple instances of  TallyGauges, which would confuse the counts in the map.

I would disagree with your assertion that tracking them as distributions is inappropriate. If the measurement will vary frequently (many times per minute), then using a distribution summary allows you to see variance within the sampling interval.

Normally, but in my specific case, we already have a counter for connections, independent of what is being asked here.   Distribution summaries add no extra value, because it was already being tracked via another means.   The thing I am trying to measure is a "steady state" like value.  The variance is already discernible via the connection establishment and teardown counters.

We could potentially have some sort of TallyGauge pattern, but I'm not fully convinced it should be a core type.

From reading the response, I feel like the issue wasn't really addressed.  In a short, one liner, the request is: "there needs to be a meter which can be incremented and decremented, not just set."    Any metric, which is logically an absolute number, but which may be concurrently modified, and is seldomly read, would be able to fit into this pattern.


Invalidate cached pages from PagingStore by fileId

What changes are proposed in this pull request?
Add and implement functions to invalidate all cached pages by fileId.
Why are the changes needed?
When we know that some file is to be removed, or renamed, or overwritten, we need to invalidate the cached pages in PagingStore.
Please note, at this moment, it is possible that the target file is already removed from UFS. So, getStatus() of this file will fail with exception. But we still need to invalidate all the cached pages.
Does this PR introduce any user facing changes?
N/A

@dbw9580 please review again.

Thanks to @dbw9580 for reviewing this PR and adding implementation.

alluxio-bot, merge this please

alluxio-bot, merge this please


US79972: Serve latest sample icons for development reference (no CDN …

…cacheing).

Is there a script somewhere too that generates the MD files?

This guy:
https://github.com/BrightspaceUI/icons/blob/master/cli/md-builder.js#L7


After conversion of div into canvas the images inside the div get shrink

I have the div inside the div there is a table and inside the table each td contain the images.
after successful conversion of canvas all the images gives blank space at the bottom.
So what I have to do it?
Please need help....

Have you tried setting td {padding-bottom:0;} and td {margin-bottom:0; }?

Yes I have  tried for this.
Even if I have taken the images 1 after another still its doing the same thing


non-word output is incorrectly ignored

Consider a test which outputs chars that are not words (in the regular expression sense):
>> '[{... + .  [  ] ...'
[{... + .  [  ] ...

Then the test will fail, probably because of the \w in example_re regexp in doctest_run.m.
Easy to trigger in Octave because of the way it renders cell-arrays.

I have a fix, subs \S (non-whitespace) for \w (word).
I'm starting to feel like we need tests for this project.

Thanks a bunch for all your work.
I had fixed some small problems that I had stumbled upon after forking the project some years ago, but I never worked on systematically improving the code. I'd certainly be glad to continue merging your pull requests, though, and we should also let upstream know about your changes.

Yes re: contacting upstream.  Especially for non-octave specific stuff.  I've sent him a message.


No Content-Length header when POSTing or PUTing an empty Django InMemoryUploadedFile

I'm trying to send a PUT request passing as the data kwarg an instance of a InMemoryUploadedFile (which is the model Django uses for uploaded files, see for reference https://docs.djangoproject.com/en/1.10/ref/files/uploads/#django.core.files.uploadedfile.InMemoryUploadedFile), like this:
files = request.FILES.getlist('file')
for uploaded_file in files:
    [...]
    requests.put(upload_url, data=uploaded_file)

The problem is that the resulting request will not have the expected Content-Length header, but the Transfer-Encoding one. I think the problem is at https://github.com/kennethreitz/requests/blob/master/requests/models.py#L492, where requests sets one header or the other based on the if length check. In the case of a stream with 0 length, the check fails and the Transfer-Encoding header gets set.
The snippet above works as intended when the file is non-empty (because the if length check passes), and also requests.put(upload_url, data=uploaded_file.read()) works (as this is not a stream anymore, but it could cause problems when reading a huge file in memory).

Why is the transfer encoding header a problem? HTTP/1.1 servers are required to understand it.

The problem is not in the Transfer-Encoding header, but the lack of the Content-Length header: if I try to upload the file to Amazon S3 (for example), it will reply with a 411 Content Length Missing reponse.

Ok, so this boils down to an S3 behaviour, as S3 requires the content length.
Requests does not in general consider this behaviour a bug: I consider S3 at fault here. However, it's understandably a problem. You should be able to get the behaviour you want by writing a small proxy object that sends all read calls to the Django object and that implements __len__, which will be enough for us to work out its length.

Oh I apologise. You're posting an empty file. Requests really does not provide an easy way to override our logic here, which is very deliberate (plenty of users pass us file objects that return a length of zero but which nonetheless return data from read()). For this reason the easiest thing to do is likely to use the PreparedRequest flow to tweak the headers of the prepared request to suit this case.

Thank you for opening this @CianciuStyles. I believe if you follow @Lukasa's advice you'll be able to solve your problem nicely. As a result, I'm closing this since it's not a bug and you now have a suitable workaround. Cheers!


Findings: Possible bugs

"Watch" eksemplet: Det ligner at den skulle stoppe efter 3 kørsler, men den genstarter for evigt ser det ud til.
 This accounts for the Watch example not working.
The Increment run counter examples does not currently run in the pectus 1.0. On openpectus it seems to work correctly.

It is unclear whether Run Counter should automatically increment on Restart. It makes sense that it should, but then the Increment run counter example does not make sense unless it is supposed to demonstrate that it is incremented twice.

Closing this as there isn't any concrete bug


zpeters speedtest results differ (at least for me) from python version

Hi,
I get different (lower) measurements with the speedtest version used in this exporter.
When using this speedtest for absolute measurements I advise to validate the results with the speedtest-cli as well as the official tools of Ookla before making a judgement speed.
Andreas

On develop branch, i update to use last version of speedtest from Zpeters.

I've also found that this exporter reports my download speed is a lot less (40Mbps) than that experienced using speedtest.net and the Python prometheus-speedtest module.

I'm having similar issue.
For me, the highest download measured using this exporter is 56Mb/s, with average of 35Mb/s.
When using speed test on the same machine (both browser and CLI version), I get around 360-490Mb/s.
This sadly makes this exporter useless, since I don't even know what it tries to show.
I'm running version 0.3.0 of docker image.


Build dependencies failed at import and can't resolve 'path'

I'm new here. Thanks for this awesome project! So, currently I'm getting this issue, I'm invested time to solve, but without success. Any help is welcome.
[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of<EMAIL_ADDRESS>for build dependencies failed at 'import(`file://${modulePath}?x=${new Date()}`)'.
Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'path' in '/node_modules/@contentlayer/core/dist'
while resolving 'path' in /node_modules/@contentlayer/core/dist as file
 at resolve esm file path
 at file dependencies<EMAIL_ADDRESS> at file<EMAIL_ADDRESS> at resolve esm file ./mdx.js
 at file dependencies<EMAIL_ADDRESS> at file<EMAIL_ADDRESS> at resolve esm file @contentlayer/core
 at file dependencies /node_modules/next-contentlayer/dist/plugin.js
 at file /node_modules/next-contentlayer/dist/plugin.js
 at resolve esm file ./plugin.js
 at file dependencies /node_modules/next-contentlayer/dist/index.js
 at file /node_modules/next-contentlayer/dist/index.js
 at resolve esm file next-contentlayer
 at file dependencies /apps/web/next.config.mjs
 at file /apps/web/next.config.mjs
 at resolve commonjs /apps/web/next.config.mjs
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'path' in '/node_modules/@contentlayer/core/dist'
while resolving 'path' in /node_modules/@contentlayer/core/dist as file
 at resolve esm file path
 at file dependencies<EMAIL_ADDRESS> at file<EMAIL_ADDRESS> at resolve esm file ./mdx.js
 at file dependencies<EMAIL_ADDRESS> at file<EMAIL_ADDRESS> at resolve esm file @contentlayer/core
 at file dependencies /node_modules/next-contentlayer/dist/plugin.js
 at file /node_modules/next-contentlayer/dist/plugin.js
 at resolve esm file ./plugin.js
 at file dependencies /node_modules/next-contentlayer/dist/index.js
 at file /node_modules/next-contentlayer/dist/index.js
 at resolve esm file next-contentlayer
 at file dependencies /apps/web/next.config.mjs
 at file /apps/web/next.config.mjs
 at resolve commonjs /apps/web/next.config.mjs

Package versions:

contentlayer: v0.1.1
next: v12.1.0
next-contentlayer: v0.1.1
react: v17.0.2
typescript: v4.5.5

Hi @schickling, thanks for you quick reply. Sure, take a look here https://github.com/brunowego/issue-reproduction/tree/next-contentlayer-129

@brunowego I've just given the repo you posted a try and it seems to work for me. Is there still a problem?

Hi @schickling, yes, nothing changed. Using NPM or Yarn commands got the same issue.

I unfortunately can't reproduce the problem with the repo you shared. Can you please try to delete .next and node_modules and try again? (Ideally with a little video demo.)

Thanks a lot for your time! I really understand that is hard to reproduce this error. Yes, I removed the both folders and the warning continues.

I'm getting this error as well on the latest "contentlayer": "^0.0.35-dev.5", branch.
Did you find/fix this error, by chance?

@auser thanks for your comment. Would you please mind posting a link to your repo with instructions how to reproduce this problem?

Same issue here. The problem occurs when using a next.config.mjs file. When I switch to an identical next.config.js there is no problem.
Reproduction here: https://github.com/mshick/newnewsite

I'll add, I get an additional error on startup which I've pasted below.
I've removed .next, node_modules, package-lock.json and .contentlayer per your instructions, and fully reinstalled — the issue persists. I'm on node v14.19.0, npm 6.14.16.
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of<EMAIL_ADDRESS>for build dependencies failed at 'import(`file://${modulePath}?x=${new Date()}`)'.
<w> Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'markdown-wasm/dist/markdown.node.js' in '/Users/mshick/Code/mshick/newnewsite/node_modules/@contentlayer/core/dist'
<w> while resolving 'markdown-wasm/dist/markdown.node.js' in /Users/mshick/Code/mshick/newnewsite/node_modules/@contentlayer/core/dist as file
<w>  at resolve esm file markdown-wasm/dist/markdown.node.js
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file ./markdown.js
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file @contentlayer/core
<w>  at file dependencies /Users/mshick/Code/mshick/newnewsite/node_modules/next-contentlayer/dist/plugin.js
<w>  at file /Users/mshick/Code/mshick/newnewsite/node_modules/next-contentlayer/dist/plugin.js
<w>  at resolve esm file ./plugin.js
<w>  at file dependencies /Users/mshick/Code/mshick/newnewsite/node_modules/next-contentlayer/dist/index.js
<w>  at file /Users/mshick/Code/mshick/newnewsite/node_modules/next-contentlayer/dist/index.js
<w>  at resolve esm file next-contentlayer
<w>  at file dependencies /Users/mshick/Code/mshick/newnewsite/next.config.mjs
<w>  at file /Users/mshick/Code/mshick/newnewsite/next.config.mjs
<w>  at resolve commonjs /Users/mshick/Code/mshick/newnewsite/next.config.mjs

I'm also getting pretty much the same warnings in logs when using with next.config.mjs. I'm on node v16.14.0 with yarn v1.22.17.

See logs
event - compiled client and server successfully in 2.9s (146 modules)
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'fs' in '/oss/frenco.dev/node_modules/@contentlayer/utils/dist/node'
<w> while resolving 'fs' in /oss/frenco.dev/node_modules/@contentlayer/utils/dist/node as file
<w>  at resolve esm file fs
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file ./fs.js
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file @contentlayer/utils/node
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file ./ArtifactsDir.js
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file @contentlayer/core
<w>  at file dependencies /oss/frenco.dev/node_modules/next-contentlayer/dist/plugin.js
<w>  at file /oss/frenco.dev/node_modules/next-contentlayer/dist/plugin.js
<w>  at resolve esm file ./plugin.js
<w>  at file dependencies /oss/frenco.dev/node_modules/next-contentlayer/dist/index.js
<w>  at file /oss/frenco.dev/node_modules/next-contentlayer/dist/index.js
<w>  at resolve esm file next-contentlayer
<w>  at file dependencies /oss/frenco.dev/next.config.mjs
<w>  at file /oss/frenco.dev/next.config.mjs
<w>  at resolve commonjs /oss/frenco.dev/next.config.mjs
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'path' in '/oss/frenco.dev/node_modules/@contentlayer/utils/dist'
<w> while resolving 'path' in /oss/frenco.dev/node_modules/@contentlayer/utils/dist as file
<w>  at resolve esm file path
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file ./file-paths.js
<w>  at file dependencies<EMAIL_ADDRESS><w>  at file<EMAIL_ADDRESS><w>  at resolve esm file @contentlayer/utils
<w>  at file dependencies /oss/frenco.dev/node_modules/next-contentlayer/dist/plugin.js
<w>  at file /oss/frenco.dev/node_modules/next-contentlayer/dist/plugin.js
<w>  at resolve esm file ./plugin.js
<w>  at file dependencies /oss/frenco.dev/node_modules/next-contentlayer/dist/index.js
<w>  at file /oss/frenco.dev/node_modules/next-contentlayer/dist/index.js
<w>  at resolve esm file next-contentlayer
<w>  at file dependencies /oss/frenco.dev/next.config.mjs
<w>  at file /oss/frenco.dev/next.config.mjs
<w>  at resolve commonjs /oss/frenco.dev/next.config.mjs

I've taken a deeper look into this issue and the provided repro (thanks @mshick). Here is what I've found:

Incorrect Next.js plugin usage

It seems like the original issue was related to the usage of the Next.js plugin and was by @brunowego by using export default withContentlayer()(nextConfig) in the Next config.

Next.js warning

Additionally to the original problem (see (1)) there seems to be another problem (which technically is only a "warning") which isn't a problem in Contentlayer itself but rather a bug in Next.js / Webpack (see https://github.com/vercel/next.js/issues/33693) when using next.config.mjs instead of next.config.js. My understanding is that this issue will be addressed by the Next.js team very soon.
If you don't want to wait until this problem is addressed in Next.js, please use next.config.js (via CommonJS) for now.

Given (1) was successfully solved and (2) is an external problem with known workaround, I'll close this issue. If there are any further problems related to this, please provide further context in the comments or on Discord.

Example next.config.js, for the next person who comes along and sees this:
const { withContentlayer } = require("next-contentlayer");

module.exports = withContentlayer();

File updated: 2023-07-02-playwright-logo.mdx
✘ [ERROR] Could not resolve "path"

    ../../node_modules/.pnpm/next@13.4.7_react-dom@18.2.0_react@18.2.0_sass@1.63.6/node_modules/next/dist/compiled/micromatch/index.js:22:3444:
      22 │ ...ge},17:e=>{e.exports=require("path")},837:e=>{e.exports=require...
         ╵                                 ~~~~~~

  The package "path" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

✘ [ERROR] Could not resolve "util"

    ../../node_modules/.pnpm/next@13.4.7_react-dom@18.2.0_react@18.2.0_sass@1.63.6/node_modules/next/dist/compiled/micromatch/index.js:22:3479:
      22 │ ...)},837:e=>{e.exports=require("util")}};var t={};function __nccw...
         ╵                                 ~~~~~~

  The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

Error: Found 1 problems in 1 documents.

 └── Encountered unexpected errors while processing of 1 documents. This is possibly a bug in Contentlayer. Please open an issue.

     • "2023-07-02-playwright-logo.mdx": UnexpectedMDXError: Error: Build failed with 2 errors:
     ../../node_modules/.pnpm/next@13.4.7_react-dom@18.2.0_react@18.2.0_sass@1.63.6/node_modules/next/dist/compiled/micromatch/index.js:22:3444: ERROR: Could not resolve "path"
     ../../node_modules/.pnpm/next@13.4.7_react-dom@18.2.0_react@18.2.0_sass@1.63.6/node_modules/next/dist/compiled/micromatch/index.js:22:3479: ERROR: Could not resolve "util"

Still getting this error.
This is my MDX:
---
author: luc-gagan
description: "Playwright logos and brand assets for press and media use."
guid: 0189174d-eed1-78d6-ae06-1a117062f130
publishedAt: 2023-07-02T15:52:03.773Z
slug: playwright-logo
tags: [playwright, playwright-test]
title: "Playwright logos and brand assets"
altTitle: "Press & media resources"
---

import { BrandAssets } from '../components/BrandAssets.tsx';

My next config is already wrapped with withContentlayer.
What could be off?

Also receiving the same error as @lucgagan

So since ContentLayer doesn't work correctly with ESM/next.config.mjs, that means it's incompatible with the plaiceholder package, which requires ESM/next.config.mjs.
Shame. I hope this is resolved at some point.

I also having the same issue here like saying -webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of /home/kinfish/loglib/node_modules/.pnpm/@contentlayer+core@0.3.1_esbuild<EMAIL_ADDRESS>for build dependencies failed at 'import(file://${compiledConfigPath}``

@schickling appears this was closed without resolution

For what it is worth, migrating the entire project back to commonjs makes the issue go away.

I have been tryna solve the problem from my side also. But first I wanted to understand what could be the issue.
Client side and server side
Since contentlayer compiles or renders or whatever it does, it does it on the server side, not the client side. I am using NextJS version 14. When I use "use client", I get this error. But when it is a server component, I do not get the error.
A way to solve the problem
If you are using the useMDXComponent and you are overriding your components, there you can customize the elements with client side components.
So what I did is create a new element on the mdx file:
some content here
<comp prop={any} />

Then I added the new "element" to my customized components, like this:
...
comp: ({...props }) => (
    <ClientSideComponent
      props={props}
    />
 )

Here is how your client side will look like:
"use client";

import React from "react";

export default function ClientSideComponent({ props }: {props: {[x: string]: any;}}) {
    return (
        ...jsx
    )
}

So instead of using your client side component directly on the mdx file, like this:
import ClientSideComponent from "../path/ClientSideComponent";

Some conent

<ClientSideComponent  />

You just use the way I showed. The code is type safe if you are using TypeScript. Hope this helps, if it does not, no worries your a re programmer, you will figure it out 🥴.

plaiceholder

Also makes it incompatible with remark-gfm along with other packages.

I had the same error, and I tried installing remark-gfm at version 3.0.1, but it still did not work. However, when I removed the import from custom elements in the .mdx file, the problem disappeared. I still have a warning:
Warning: Contentlayer might not work as expected on Windows
Contentlayer config change detected. Updating type definitions and data...
I changed from this .mdx file:
mdx
...
import { Image } from 'next/image';
...
To this one:
mdx
...
// import { Image } from 'next/image'; removing this
...

I had the same error, and I tried installing remark-gfm at version 3.0.1, but it still did not work. However, when I removed the import from custom elements in the .mdx file, the problem disappeared. I still have a warning:
Warning: Contentlayer might not work as expected on Windows
Contentlayer config change detected. Updating type definitions and data...

I changed from this .mdx file:
...
import { Image } from 'next/image';
...

To this one:
...
// import { Image } from 'next/image'; removing this
...


[Question]: 'NoneType' object has no attribute 'create_collection'

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
      async def create_index_nodes(self, nodes,embed_model, vector_store):
          """
          Asynchronously creates an index in Qdrant based on the provided nodes.

          :param nodes: List of TextNodes to index.
          :param vector_store: The Qdrant vector store instance.
          """
          storage_context = StorageContext.from_defaults(vector_store=vector_store)

          vector_index =  VectorStoreIndex(
              nodes=nodes,
              embed_model=embed_model,
              storage_context=storage_context
          )
          return vector_index

self._client.create_collection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'create_collection'
please help. @dosubot

I'm assuming this is qdrant? Make sure you pass in both the client and aclient
QdrantVectorStore(..., client=QdrantClient(...), aclient=AsyncQdrantClient(...))