text:
Compatibility with Netty

I'm attempting to use this library with Netty and notice that in many places it's using a ThreadLocal which does not work with Netty. Netty has the concept of a ChannelHandlerContext which performs similarly (one channel per-request).
This results in some errors about attempting to close spans from requests which are incorrectly associated as soon as you begin handling concurrent requests.
The library currently does not make this change easy to implement but it would not be difficult, it looks like TraceContextHolder needs to be changed to an interface and provide implementations for ThreadLocal and ChannelHandlerContext/AttributeMap.
I'm thinking here that the easiest way to begin this would be to change TraceContextHolder into an interface and then provide a default ThreadLocalTraceContextHolder. I should then be able to provide an alternate implementation of DefaultTrace in my own project which would be NettyTrace and there's no need to provide any Netty dependencies in this project.
Before I begin this work I want to understand if there's anything I'm missing here, is there more to this than an implementation like this?

@dsyer @smaldini isn't this related to Spring 5.0, Reactive approach etc ?

This is an insightful and spot-on question, we are definitively thinking about it for our concerns regarding Reactor,  Spring 5 (and also reactor-netty which suffer exactly that same issue) /cc @rstoyanchev
We have a tight schedule for the coming weeks until early August but we will be able to discuss in depth the topic very soon (thanks SpringOne 2016 💃). Be sure this is a top priority concern not only for tracing but also stuff like security or scopes which are using the same thread local trick.

So the idea is to store trace information as Netty channel attributes? Do you have access to the Netty channel from all the places where you need to access or update trace information?

I'm not a Netty expert to say the least. What we need to accomplish is that per-request we need to propagate some data between different contexts / libraries / threads etc. If we can accomplish that via channel attributes then most likely that's the way to go. In other words if ChannelHandlerContext is ThreadLocal for Netty then it seems like a good start.
On the other hand I guess we'll have to sit down and analyze it more since maybe we're trying to bend Netty's reactive approach to use the current Sleuth's implementation. Don't know - just asking.

@marcingrzejszczak i was thinking that if you implemented something technology agnostic by allowing me to inject my own object that knows how to store information it would solve the issue e.g.
@Component
public class TraceContextHolder {

  @Inject
  @Named("localTraceContext")
  private Local<Span> currentSpan;

  public Span getCurrentSpan() {
    return currentSpan.get();
  }

  public void setCurrentSpan(Span span) {
    currentSpan.set(span);
  }

  public void removeCurrentSpan() {
    currentSpan.remove();
  }

  public boolean isTracing() {
    return currentSpan.get() != null;
  }
}

and then provided a Local interface that can be injected then this would solve the issue.
interface Local<T> {
  T get();
  void set(T value);
  void remove();
}

The spring-cloud-sleuth library can provide a Spring compatible implementation by default using ThreadLocal and then I can define my own bean which overrides this and uses something native to the framework that I'm using.
This isn't a perfect implementation, I'd still need to figure out how to pass a reference to the channel to the get, set and remove methods but I think it conveys the idea behind it.

A Channel is just an abstraction representing a connection. You can attach attributes like you can to a Servlet request. To get those attributes you need access to pass the Channel around. Hence my question how would the Channel be accessed from different contexts, libraries, etc. @mjallday ?

Oops, I should have hit Refresh before responding. At any rate I'd be interested to see the direction of this. As @smaldini mentioned this is an important topic for the Spring Framework 5 reactive efforts.

Related to https://github.com/spring-cloud/spring-cloud-sleuth/issues/143 and https://github.com/spring-cloud/spring-cloud-sleuth/issues/344

We have introduced support for Project Reactor in latest 1.3.0.BUILD-SNAPSHOT (Edgware release train) so this problem is fixed indirectly via the Reactor Context + custom subscribers. Would that work for now to solve this issue @mjallday ? If not then you can extend the DefaultTracer and provide your own implementation of what setting and getting a span should look like. WDYT ?

Ping @mjallday ?

fyi, in another project doing raw netty http, attributes are used to carry
the trace context from here to there. This is the "spanInScope" commands
you see. https://github.com/openzipkin/brave/pull/441 This particular work
is waiting for others to be interested in it, but feel free to take ideas
here as there are similar concepts in sleuth for this stuff.

I'll put it to icebox until more people are interested and the Brave work has been done.

@marcingrzejszczak what is the current status on this issue? I can see that the work on Brave has been implemented and released a couple of weeks ago.

@goober last week we discussed that we'll start the major work soon (not that spring one platform is over). Can you describe the components you use and if you can beta test something even if it doesn't use the old sleuth span api? It will help us prioritize.

Thanks for the update @adriancole.
We are currently doing some test shots with Spring Boot 2 (2.0.0 M7) and spring-webflux running the Netty runtime to see if our dependencies are compatible. We are doing downstream requests to other services via WebClient.
So our case is that we would like to have distributed tracing with spring-cloud-sleuth working with spring-webflux and the new WebClient from Spring Framework 5 (on a Netty runtime) as it currently works with the older synchronous spring-mvc and restTemplate on a tomcat runtime.
We can for sure beta test your findings during the process and can also help out with whatever you need!

WebClient from Spring Framework 5 (on a Netty runtime)

Why would you say that it's not working with Netty runtime ATM? We have instrumented WebClient as such so that should work fine out of the box

@marcingrzejszczak I can now confirm that WebClient works just fine with spring cloud sleuth. It was our mistake that we didn't create the WebClient or WebClient.Builder as a spring bean.

Great. So I'll close this issue for now.

authors: adriancole goober marcingrzejszczak mjallday rstoyanchev smaldini

repo: spring-cloud/spring-cloud-sleuth


text:
greeting method in GreetingController is missing @ResponseBody annotation.

The guide mentions @ResponseBody (README.adoc, line 219) but the annotation is both missing in the GreetingController listing and the accompanying example code.
I'd be happy to make a PR :).
Thank you.

Please do make a PR for it. Thanks.

You don't need a @ResponseBody in a @RestController. So better to fix the README text IMO.

You don't need a @ResponseBody in a @RestController. So better to fix the README text IMO.

Thanks for the clarification (I'm still learning Spring in tandem with Spring Boot :)).

Please do make a PR for it. Thanks.

Great! You're welcome.

source: gharchive/issue

authors: Buzzardo Nico769 dsyer

repo: spring-guides/gs-rest-service-cors

license_type: permissive

license_source: github-api


text:
Missing hint for org.hibernate.cfg.beanvalidation.TypeSafeActivator.

Though the project (odrotbohm/spring-restbucks) does not make use of javax.validation within its code there's an error on startup caused by missing reflection configuration for org.hibernate.cfg.beanvalidation.TypeSafeActivator.
spring-native: 0.11.0-SNAPSHOT
Branch: odrotbohm/spring-restbucks/native-0.11
Module: server
Additional Required Configuration: NativeConfiguration.java

We have a related hint which is probably using the wrong trigger or is defined with a too narrow access. Could you refine it based on your findings on this sample?

Closing in favor of #1331

authors: christophstrobl sdeleuze snicoll


text:
If a dependency is added to both compile and provided, it shows up only provided in IDE

I have a base build that applies a dependency as provided to subprojects.  one subproject tries to override it by putting the same dependency into compile.  But in Intellij, the module shows up provided, and its transitive dependency compile.

The propdeps plugin has moved to the Spring Attic and is no longer maintained.

authors: apatrida wilkinsona

repo: spring-projects/gradle-plugins


text:
AMQP-594: Fix for @RabbitListener when CGLIB

JIRA: https://jira.spring.io/browse/AMQP-594
Previously with the CGLIB proxy and generic interface implementation
the RabbitListenerAnnotationBeanPostProcessor registered two endpoints for "different"
methods for the same @RabbitListener.

Fix the issue adding ReflectionUtils.USER_DECLARED_METHODS to the method processor
Add test on the matter
Also add a note to the Reference Manual regarding Proxy behavior

Cherry-pick to 1.5.x

Merged as 1c4dd54e4c8c69424c40c2b1d33a21a5a5f03caa and cherry-picked after resolving conflicts.

source: gharchive/pull-request

authors: artembilan garyrussell

repo: spring-projects/spring-amqp


text:
JTI claim missing in generated JWT access token

Describe the bug
JTI claim missing in generated JWT access token
To Reproduce
Generate JWT access token using client_Credentials grant type
Expected behavior
A jwt token with following default claims:
{
"sub": "testClientAK2",
"aud": "testClientAK2",
"nbf": 1694598773,
"scope": [""],
"iss": "http://localhost:9000",
"exp": 1694599773,
"iat": 1694598773,
"jti": xxx
}
Sample
My current JWT token has the following:
{
"sub": "testClientAK2",
"aud": "testClientAK2",
"nbf": 1694598773,
"scope": [""],
"iss": "http://localhost:9000",
"exp": 1694599773,
"iat": 1694598773,
}
I would like to ask how to set the jti claim(by default) in the access token.

Related stackoverflow question: https://stackoverflow.com/questions/77096271/how-to-set-jti-claim-in-jwt-token-generated-by-spring-authorization-server
Note: I asked the reporter to open an issue, but this issue was opened previously (as a cross-post of the question).

Yes, it was opened parallelly for a quicker response. But thanks for consideration

@jasmine0508 Questions are better suited to Stack Overflow. We prefer to use GitHub issues only for bugs and enhancements.
Closing as duplicate of gh-1308

I agree, hence I had raise a question on stackoverflow and post the response of one of the users (https://stackoverflow.com/users/15835039/steve-riesenberg), and post providing justifications for the same, shared the same as an enhancement.
Me - Have a look at auth0.com/docs/secure/tokens/json-web-tokens/…. Though these are Optional but the document says "The JWT specification defines seven reserved claims that are not required, but are recommended to allow interoperability with third-party applications."
Steve - Ok, so not a spec but a recommendation by Auth0. Thanks! I think it would be worth opening an issue for that to discuss whether it should be added by default. –
Steve Riesenberg
Hence raised it as a request. Ofcourse everything can be customized in the token including jti. But considering it as a part of JWT token was the request. As I had already checked that opaque token had jti claim added by default

@jasmine0508 Re-opening this and I updated the title to reflect that this is an enhancement request.

authors: jasmine0508 jgrandja sjohnr


text:
Add option to receive an empty list (or ConsumerRecords) when a poll returns no records

Batch listeners only; false by default in 2.2, true in 2.3.

@garyrussell I just came across such use-case, we have a kafka listener which should batch messages (in-memory)until a certain threshold is reached,once the threshold is reached(for example certain size in bytes), we should create batch insert to some db.
Binding kafka max fetch records to the db batch size is problematic since we have some filtering logic and we might end up in small batches which is far from optimal in our case.
using ListenerContainerIdleEvent is also problematic since it can run on a different thread and therefore we cannot use it's  consumer for commiting offsets due to race condiiton. also synchonizing the threads won't work either because we might end with race condition between the kafka listener handler method and the Let's close it in favor of ListenerContainerIdleEvent.
It actually seems like a pretty trivial use case for a message container which is in charge of batching data for sending it to sink database.
I believe for such use-cases kafka consumer itself do support invoking handler with empty records list, any thoughts how we might solve this?

it can run on a different thread

Only if you change the application context's default event dispatcher; otherwise it will always be called on the consumer thread.

authors: garyrussell kobynet

repo: spring-projects/spring-kafka


text:
GH-970: Add getGroupId() to containers

Resolves https://github.com/spring-projects/spring-kafka/issues/970

allow retrieval of the group.id, even if not set on the container properties
also add getAllListenerContainers to the RLERegistry as a convenience
also add getListenerId to return the id or bean name of the container

cherry-pick to 2.2.x

... and cherry-picked to 2.2.x.


text:
XD-2942 - add ftp source module

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.
Tell me if I forgot something. Thx

Looks pretty good overall, will try to test more next week

Would you like me to change it (default values stuff) ?

If you could, that'd be awesome, yes!
Le 12 avr. 2015 17:03, "fmarchand" notifications@github.com a écrit :

Would you like me to change it (default values stuff) ?
—
Reply to this email directly or view it on GitHub
https://github.com/spring-projects/spring-xd/pull/1554#issuecomment-92076969
.

Ok I'm gonna try tonight so you can work on it next week. Thank you for your quick answer !

Done !

Worked that some more, enough so to warrant opening a separate PR and have someone else review it: https://github.com/spring-projects/spring-xd/pull/1557
Closing this one, fell free to give a try at the above PR

authors: ericbottard fmarchand

repo: spring-projects/spring-xd


text:
Springfox 2.9.0 - Not really compatible with Java 6

The 2.9.0 release rely on jackson-databind 2.9.5, which is compiled for Java 7, and the JVM obviously throws an "unsupported" exception.
Any workaround?
Edit:
Also swagger-models and swagger-annotations 1.5.18 are compiled for Java 8.
But are you sure this was ever tested on Java 6? I'm not able to run even downgrading to 2.8.0, which is based on 1.5.14, that is compiled against Java 7.

So basically I recompiled swagger-annotations and swagger-models for class level 6.

@lppedd it is not compatible with java 6. There is no way to build using gradle and java 6 without support for TLS.

@dilipkrish Ok, thanks! But than isn't it better to remove the "This is the last release supporting jdk 6" part?

Totally! thanks for catching that. That was written before GitHub/bintray stopped supporting lower TLS version!

@dilipkrish I think we can close this.

authors: dilipkrish lppedd

repo: springfox/springfox


text:
ApiModelProperty dataType is ignored

Version: 1.0.2
Is it correct behavior that BaseModelProperty ignores dataType set to @ApiModelProperty annotation?
For the following code:
@ApiModel
public class SomeInfo {

    @ApiModelProperty(required = false, dataType = "java.lang.String")
    public final Optional<String> code;

I expect to get swagger json with dataType string, but I still get optional<String>
Model schema is rendered like that:
{
  "code": {
    "present": false
  }
}

@Aloren unfortunately that is a true statement. Pre-2.0 we don't support overriding model properties. For that particular use-case however you could use genericModelSubstitute for Optional. I'd use that solution for 2.x as well.

@dilipkrish Thank you! That works like magic :)

authors: Aloren dilipkrish


text:
Documentation not generated in latest versions of springfox

Whilst integrating springfox with our SpringMVC application I had problems using the latest versions of springfox.
These are the versions and problems encountered:
v2.2.2-2.1.2
Exception thrown when loading war in tomcat:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apiOperationReader' defined in URL [jar:file:/usr/local/apache-tomcat-7.0.42/webapps/ers-external-service/WEB-INF/lib/springfox-spring-web-2.1.2.jar!/springfox/documentation/spring/web/readers/operation/ApiOperationReader.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class springfox.documentation.spring.web.readers.operation.ApiOperationReader]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:912) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:855) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:770) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:803) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:731) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 33 common frames omitted
Caused by: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class springfox.documentation.spring.web.readers.operation.ApiOperationReader]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:217) ~[spring-aop-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:111) ~[spring-aop-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:477) ~[spring-aop-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:362) ~[spring-aop-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) ~[spring-aop-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:409) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1518) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 43 common frames omitted
Caused by: java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
at org.springframework.cglib.proxy.Enhancer.emitConstructors(Enhancer.java:721) ~[spring-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.cglib.proxy.Enhancer.generateClass(Enhancer.java:499) ~[spring-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33) ~[spring-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[spring-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216) ~[spring-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) ~[spring-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.cglib.proxy.Enhancer.create(Enhancer.java:285) ~[spring-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205) ~[spring-aop-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 50 common frames omitted
v2.1.1-2.0.3
It appears that springfox never finishes initialising and therefore I never see "Servlet '[service-name]' configured successfully".
Accessing the documentation URL ([service-name]/v2/api-docs) results in an empty page in the browser.
Last lines in the log are:
[localhost-startStop-13] DEBUG s.d.s.w.r.o.OperationResponseClassReader - Setting spring response class to:Appointment
[localhost-startStop-13] INFO  s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method createAppointmentRequest was referral
[localhost-startStop-13] DEBUG s.d.s.r.o.OperationAuthReader - Authorization count 1 for method createAppointmentRequest
[localhost-startStop-13] DEBUG s.d.s.r.o.SwaggerOperationResponseClassReader - Setting response class to:Appointment
v2.0.2
Works correctly but startup time is increased due to heavy debug logging from springfox (presumably already resolved in later version).
v2.0.1
Works.
Question
Ideally it would be great if we could use the latest version of springfox to take advantage of new features and bug fixes. I included issues with earlier versions just for context.
How do we solve the 'IllegalArgumentException: Superclass has no null constructors but no arguments were given' issue with the latest version?
Please let me know any other details you require to help me solve the problem.
Many thanks,
Adam.

@adam150785 first off, thanks for the detailed issue :metal:
I suspect your having these issues because you don't have the latest aspectj aop version. Esply since you're on a very old version of spring, I'm not really sure what the exact steps are to fix the problem.
Is it possible to share a repo with the issue reproduced (may be with a fork of the springfox-demo) so I can help diagnose?

Thanks for the quick response @dilipkrish and the pointers.
I can see that the aspectjrt dependency from springfox-swagger2:2.2.2 is being managed to 1.7.2 from 1.8.6. I guess this could be the issue if there is an API breaking change between 1.7.2 and 1.8.6.
Was the aspectj springfox dependency changed between v2.1.1 and 2.1.2?
It's quite a complex application so creating a reproduction forked from springfox-demo would be difficult without knowing the underlying cause.
I'll try to investigate further.

@adam150785 Thanks! Would be awesome if you report back your findings. I suspect a combination of spring upgrade and aspectj dependencies revved to the latest version will fix your problems

[ ] will need to try and adjust any spring dependencies that depend on spring 4

@dilipkrish Are you suggesting there is a workaround for my issue?
I have no option of upgrading Spring as a dependent project uses v3.2.7.RELEASE and there are currently no plans to upgrade it. Therefore I'm currently stuck on springfox v2.0.2.
Any help is most appreciated.

Fixed via 39ba45f6edbaf919761937145948d46d0a26c277

Hi @dilipkrish,
Given that this is now marked as closed does that mean I should be able to use the next release of springfox with my current setup (i.e. Spring 3.2.7.RELEASE)?
If so that would be fantastic!
When is the next release due?
Thanks,
Adam.

Its not been tested and not officially supported, however what this means is that we're not depending on the aspectj dependencies which introduced problems. There is still a dependency on spring-plugin which depends on spring 4.x but you might be fine using spring 3.x.
Would be awesome if you could report back your findings.

Yeah I will give it a go.
What version can I test this in?

Its available as a 2.2.3-SNAPSHOT from the jcenter oss repository

Hi,
I've tested the 2.2.3-SNAPSHOT and it's getting worse. It's depends on a Spring 4 class (org.springframework.core.DefaultParameterNameDiscoverer).
Please, can you tell us if Spring 3 is still supported and if not can you clearly state on the springfox home page that it does no more support Spring 3 (i hope not)
Here an excerpt of the exception :
java.lang.NoClassDefFoundError: org/springframework/core/DefaultParameterNameDiscoverer
	at springfox.documentation.spring.web.readers.parameter.ParameterNameReader.<init>(ParameterNameReader.java:50)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)```

Another vote for Spring 3 support! We could very much like to upgrade to the latest version.

authors: Abdennebi adam150785 dilipkrish


text:
协同文档管理

文档在未被筛选的表格中复制数据到筛选后的表格中，会出现数据复制到筛选隐藏的其余行中，例如将三行数据复制到筛选后的三行中会出现数据跑到筛选隐藏后的单元格中。

我试了一下，excel好像也是这样的，你可以试一下excel确认一下

authors: YuAnAan springreport

repo: springreport/springreport


text:
[BUG] Links in the sample page in a customized port (8081) don't work

Describe the bug
Using a customized port, such as 8081, will make the default links in the index.php file not work because they're hardcoded:
So visiting:
http://localhost:8081/
And clicking in phpinfo(), or Test DB connection will fail
which Branch / PHP Version are you using ?
php74
To Reproduce
Steps to reproduce the behavior:

Customize .env to use 8081 as insecure port
Load the project in the browser, with http://localhost:8081/
Click in phpinfo()
See error

Expected behavior
The links should work also for non-default ports.
Screenshots

Hi @zetxek does the 16211bb solved this problem too, so we could close this issue, correct ?

Yes, 16211bb fixes this issue. We can close!

repo: sprintcube/docker-compose-lamp

license: MIT


text:
🛑 Sektionsportal is down

In 07c393a, Sektionsportal (https://login.sp-ps.ch/) was down:

HTTP code: 503
Response time: 468 ms

Resolved: Sektionsportal is back up in a036b51.

repo: spschweiz/status


text:
🛑 Terminalserver is down

In c73ac72, Terminalserver ($URL_TS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Terminalserver is back up in 6b8a2fa.


text:
NotImplementedError: The detach_policy action has not been implemented

Good afternoon,
I came across this error while using the organizations detach_policy API call:
Error
Traceback (most recent call last):
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\unittest\case.py", line 59, in testPartExecutor
    yield
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\unittest\case.py", line 605, in run
    testMethod()
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\moto\core\models.py", line 88, in wrapper
    result = func(*args, **kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\unittest\mock.py", line 1179, in patched
    return func(*args, **keywargs)
  File "C:\Users\redacted\tests\unit\test_organizations.py", line 421, in test_detach_scp
    detach_policy = self.orgs_client.detach_policy(PolicyId=policy_id, TargetId=target_id)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\client.py", line 316, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\client.py", line 622, in _make_api_call
    operation_model, request_dict, request_context)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\client.py", line 641, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\endpoint.py", line 102, in make_request
    return self._send_request(request_dict, operation_model)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\endpoint.py", line 137, in _send_request
    success_response, exception):
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\endpoint.py", line 256, in _needs_retry
    caught_exception=caught_exception, request_dict=request_dict)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\hooks.py", line 356, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\hooks.py", line 211, in _emit
    response = handler(**kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\retryhandler.py", line 183, in __call__
    if self._checker(attempts, response, caught_exception):
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\retryhandler.py", line 251, in __call__
    caught_exception)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\retryhandler.py", line 269, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\retryhandler.py", line 317, in __call__
    caught_exception)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\retryhandler.py", line 223, in __call__
    attempt_number, caught_exception)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\endpoint.py", line 197, in _do_get_response
    responses = self._event_emitter.emit(event_name, request=request)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\hooks.py", line 356, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\botocore\hooks.py", line 211, in _emit
    response = handler(**kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\moto\core\models.py", line 272, in __call__
    request, request.url, request.headers
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\moto\core\responses.py", line 197, in dispatch
    return cls()._dispatch(*args, **kwargs)
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\moto\core\responses.py", line 295, in _dispatch
    return self.call_action()
  File "C:\Users\redacted\AppData\Local\Programs\Python\Python36\lib\site-packages\moto\core\responses.py", line 393, in call_action
    "The {0} action has not been implemented".format(action)
NotImplementedError: The detach_policy action has not been implemented

I am calling it by creating a session, with that session I create the organizations client and call it:
detach_policy = self.orgs_client.detach_policy(PolicyId=policy_id, TargetId=target_id)

I am expecting the API call to succeed, but it is giving me the aforementioned error
Currently installed:
moto version 1.3.14
boto3 version 1.10.34
botocore version 1.17.28
installed all libraries using pip
Please let me know if any additional information is needed. Thanks.

Thanks for raising this @harvester843 - will mark this as an enhancement.

@bblommers I opened pull request https://github.com/spulec/moto/pull/3278 for this enhancement.

@bblommers I've made updates to the PR, could you please take a look when you have a moment. Thanks!

This is now part of moto >= 1.3.16.dev35

repo: spulec/moto

license_source: bigquery


text:
S3 tags are not persisted

Running a moto server (on port 5012 in this example), when I create bucket and add tags, the tags are not persisted.
Assuming moto_server is running using the s3bucket_path mode on http://localhost:5012, the following code prints None with v0.4.25
s3 = boto3.resource('s3',endpoint_url="http://localhost:5012")

bucketName = ''.join(random.choice(string.ascii_lowercase) for _ in range(20))
bucket = s3.Bucket(bucketName)
bucket.create()

tagging = bucket.Tagging()

tagging.put(
        Tagging={
            'TagSet': [
                {
                    'Key': 'foo',
                    'Value': 'bar'
                }
            ]
        }
    )

bucket2 = s3.Bucket(bucketName)

tags = bucket2.Tagging().tag_set

print tags

Yes I found the same issue and started some preliminary work on it but got side tracked.

I have a bunch of patches for this and others. Waiting on corporate red tape to give thumbs up to contributing back.

A patch would be much appreciated!

This seems to be fixed now; feel free to reopen if you see otherwise

authors: johnmcteague rocky4570 spulec


text:
CloudwatchLogs - implement validation for old/new messages

Closes #3979
Implements validation for:

log events not in chronological order
log events that are too old (> 2 weeks ago)
log events that are too recent (> 2 hours in the future)

Tests were validated against AWS

Codecov Report

Merging #4565 (1f0551c) into master (701465d) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4565      +/-   ##
==========================================
+ Coverage   95.06%   95.16%   +0.09%
==========================================
  Files         515      515
  Lines       58712    58746      +34
==========================================
+ Hits        55816    55907      +91
+ Misses       2896     2839      -57

Flag
Coverage Δ

servertests
47.89% <12.00%> (-0.02%)
:arrow_down:

test_responses
32.39% <12.00%> (-0.02%)
:arrow_down:

unittests
95.07% <100.00%> (+0.09%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

moto/batch/models.py
88.64% <100.00%> (+0.01%)
:arrow_up:

moto/events/models.py
94.67% <100.00%> (ø)

moto/logs/models.py
95.16% <100.00%> (+0.16%)
:arrow_up:

moto/logs/responses.py
95.28% <100.00%> (+0.04%)
:arrow_up:

moto/awslambda/models.py
92.89% <0.00%> (-0.12%)
:arrow_down:

moto/s3/models.py
94.49% <0.00%> (ø)

moto/dynamodb2/exceptions.py
100.00% <0.00%> (ø)

moto/dynamodb2/models/__init__.py
95.91% <0.00%> (+0.01%)
:arrow_up:

moto/iot/models.py
91.83% <0.00%> (+0.08%)
:arrow_up:

moto/ec2/utils.py
91.95% <0.00%> (+0.48%)
:arrow_up:

... and 2 more

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 701465d...1f0551c. Read the comment docs.

authors: bblommers codecov-commenter


text:
About Could not apply withXml() to generated POM

The same issue to me，https://github.com/vanniktech/gradle-maven-publish-plugin/issues/799
After debugging, I found that the error occurred in org/jetbrains/kotlin/gradle/plugin/mpp/Publishing#rewritePom. Whether the generated POM is rewritten is controlled by kotlin.mpp.keepMppDependenciesIntactInPoms. So, for now, I disabled it in gradle.properties, and then publishing the module to Maven worked fine.
kotlin.mpp.keepMppDependenciesIntactInPoms=true

Thank you for the solution.
I remember that I've encountered this issue, but to be honest, I don't remember where. How did you connect this repository with it?
Edit:
Oh, I see, Slack. :D
Thanks again, I'll look into it
https://kotlinlang.slack.com/archives/C3PQML5NU/p1716955162094439 (so I don't forget again)

Yes, but it's unclear what bugs this might cause

I have reported a bug to Gradle: https://github.com/gradle/gradle/issues/29793

authors: Jadyli toth-istvan-zoltan

repo: spxbhuhb/adaptive


text:
Continuously asks for access to my documents.

Description
What steps will reproduce the problem?

Unknown. Stop asking to see all my documents beyond the directory I indicate in my code.
Traceback
Exception in comms call get_cwd:
  File "/Users/dukechowdhury/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 342, in _handle_remote_call
    buffer['call_kwargs'])
  File "/Users/dukechowdhury/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 353, in _remote_callback
    *call_args, **call_kwargs)
  File "/Users/dukechowdhury/anaconda3/lib/python3.7/site-packages/spyder_kernels/console/kernel.py", line 356, in get_cwd
    return os.getcwd()
PermissionError: [Errno 1] Operation not permitted

Versions

Spyder version: 4.0.1
Python version: 3.7.0
Qt version: 5.9.6
PyQt5 version: 5.9.2
Operating System: Darwin 19.3.0

Dependencies
applaunchservices >=0.1.7    :  0.2.1 (OK)
atomicwrites >=1.2.0         :  1.3.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
cloudpickle >=0.5.0          :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
IPython >=4.0                :  7.12.0 (OK)
jedi =0.14.1                 :  0.14.1 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
numpydoc >=0.6.0             :  0.9.2 (OK)
pexpect >=4.4.0              :  4.8.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
psutil >=0.3                 :  5.6.7 (OK)
pygments >=2.0               :  2.5.2 (OK)
pylint >=0.25                :  2.4.4 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.7 (OK)
zmq >=17                     :  18.1.1 (OK)
qdarkstyle >=2.7             :  2.8 (OK)
qtawesome >=0.5.7            :  0.6.1 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
rtree >=0.8.3                :  0.9.3 (OK)
sphinx >=0.6.6               :  2.4.0 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
watchdog                     :  None (OK)
cython >=0.21                :  None (NOK)
matplotlib >=2.0.0           :  None (NOK)
numpy >=1.7                  :  1.18.1 (OK)
pandas >=0.13.1              :  1.0.0 (OK)
scipy >=0.17.0               :  None (NOK)
sympy >=0.7.3                :  None (NOK)

This is a problem with macOS Catalina. Please see here
https://stackoverflow.com/questions/58372768/file-permissions-issue-with-python-spyder-anaconda-after-upgrading-mac-to-catali
to learn how to fix it.

repo: spyder-ide/spyder


text:
BrokenProcessPool: A process in the process pool was terminated abruptly [Spyder]

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[x] Could not reproduce inside jupyter qtconsole (if console-related)
[x] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[x] Reset preferences with spyder --reset
[x] Reinstalled the latest version of Anaconda
[x] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
Problem is described at the following StackOverflow post and I was invited to raise the issue here :
https://stackoverflow.com/questions/60571344/brokenprocesspool-a-process-in-the-process-pool-was-terminated-abruptly-spyder
What steps reproduce the problem?

When I use the run button to execute the code I got the : BrokenProcessPool message
If i execute the code manually by section (using selct and F9) it sometimes works and sometimes don't.

What is the expected output? What do you see instead?
When it works, everything works as expected, the main problem is the inconsistency, eventhough nothing was added or removed in the code I don't understand what cause the erratic behaviour.
Paste Traceback/Error Below (if applicable)

Traceback (most recent call last):

  File "<ipython-input-4-268ffa352430>", line 46, in <module>
    main()

  File "<ipython-input-4-268ffa352430>", line 34, in main
    results = [ff.result() for ff in futures]

  File "<ipython-input-4-268ffa352430>", line 34, in <listcomp>
    results = [ff.result() for ff in futures]

  File "C:\Users\B0540002\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\_base.py", line 432, in result
    return self.__get_result()

  File "C:\Users\B0540002\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception

BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

Versions

Spyder version: 4.0.1
Python version: 3.7.1
Qt version: 5.9.6
PyQt version: 5.9.2
Operating System name/version: Windows 10

Dependencies

scipy 1.4.1
numpy 1.18.1
pandas 1.0.1

Thanks for reporting. We'll try to take a look at this in the next months.


text:
Switching from extrenal monitor to laptop display

Description
What steps will reproduce the problem?

External monitor and Laptop display at HD resolution 1920x1080. Spyder located on external display.
External monitor switches off due to power saving, Spyder goes to laptop monitor = crash
Traceback
  File "/usr/local/lib/python3.7/dist-packages/spyder/app/mainwindow.py", line 1393, in handle_new_screen
    self.show_dpi_change_message)
TypeError: 'method' object is not connected
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/spyder/app/mainwindow.py", line 1393, in handle_new_screen
    self.show_dpi_change_message)
TypeError: 'method' object is not connected
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/spyder/app/mainwindow.py", line 1393, in handle_new_screen
    self.show_dpi_change_message)
TypeError: 'method' object is not connected

Versions

Spyder version: 4.1.1
Python version: 3.7.3
Qt version: 5.12.4
PyQt5 version: 5.12.3
Operating System: Linux 5.0.0-38-generic

Dependencies

# Mandatory:
atomicwrites >=1.2.0           :  1.3.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.2.2 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.8.0 (OK)
jedi =0.15.2                   :  0.15.2 (OK)
keyring                        :  None (OK)
nbconvert >=4.0                :  5.6.0 (OK)
numpydoc >=0.6.0               :  0.9.1 (OK)
parso =0.5.2                   :  0.5.2 (OK)
pexpect >=4.4.0                :  4.6.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.6.3 (OK)
pygments >=2.0                 :  2.4.2 (OK)
pylint >=0.25                  :  2.4.1 (OK)
pyls >=0.31.9;<0.32.0          :  0.31.9 (OK)
qdarkstyle >=2.8               :  2.8 (OK)
qtawesome >=0.5.7              :  0.6.0 (OK)
qtconsole >=4.6.0              :  4.6.0 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
sphinx >=0.6.6                 :  2.2.0 (OK)
spyder_kernels >=1.9.0;<1.10.0 :  1.9.0 (OK)
watchdog                       :  None (OK)
xdg >=0.26                     :  0.26 (OK)
zmq >=17                       :  18.1.0 (OK)

# Optional:
cython >=0.21                  :  None (OK)
matplotlib >=2.0.0             :  3.1.1 (OK)
numpy >=1.7                    :  1.17.2 (OK)
pandas >=0.13.1                :  1.0.3 (OK)
scipy >=0.17.0                 :  1.4.1 (OK)
sympy >=0.7.3                  :  1.5.1 (OK)

Fixed in our 4.1.2 version. Please update.


text:
there is a issue that I don't know how to deal with it

Description
What steps will reproduce the problem?

The details are as followed:
current_pos_text = text[offset - 1]
IndexError: string index out of range
Traceback
  File "D:\python\Anaconda3\lib\site-packages\spyder\plugins\completion\fallback\actor.py", line 155, in handle_msg
    msg['current_word'])
  File "D:\python\Anaconda3\lib\site-packages\spyder\plugins\completion\fallback\actor.py", line 62, in tokenize
    valid = is_prefix_valid(text, offset, language)
  File "D:\python\Anaconda3\lib\site-packages\spyder\plugins\completion\fallback\utils.py", line 122, in is_prefix_valid
    current_pos_text = text[offset - 1]
IndexError: string index out of range

Versions

Spyder version: 4.1.1
Python version: 3.7.6
Qt version: 5.9.6
PyQt5 version: 5.9.2
Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0           :  1.3.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.3.0 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.13.0 (OK)
jedi =0.15.2                   :  0.15.2 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  0.9.2 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.5.2                   :  0.5.2 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=0.25                  :  2.4.4 (OK)
pyls >=0.31.9;<0.32.0          :  0.31.9 (OK)
qdarkstyle >=2.8               :  2.8 (OK)
qtawesome >=0.5.7              :  0.7.0 (OK)
qtconsole >=4.6.0              :  4.7.2 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.3 (OK)
sphinx >=0.6.6                 :  2.4.4 (OK)
spyder_kernels >=1.9.0;<1.10.0 :  1.9.1 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  18.1.1 (OK)

# Optional:
cython >=0.21                  :  0.29.15 (OK)
matplotlib >=2.0.0             :  3.1.3 (OK)
numpy >=1.7                    :  1.18.1 (OK)
pandas >=0.13.1                :  1.0.3 (OK)
scipy >=0.17.0                 :  1.4.1 (OK)
sympy >=0.7.3                  :  1.5.1 (OK)

@ChamlamLeung, thanks for reporting. This error will be fixed in our next version (4.1.4), to be released this week.

Thank you for your reply.
Could you please inform me when the version (4.1.4) is released? Thanks.
On 6/29/2020 03:56，Carlos Cordobanotifications@github.com wrote：
@ChamlamLeung, thanks for reporting. This error will be fixed in our next version (4.1.4), to be released this week.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi! Last time you told me that the next version spyder 4.1.4 would be released soon. However, until now I can not find the newest version 4.1.4 in ANACONDA. So, is there any other ways to get this version? Or is it released?
Thank you!
On 6/29/2020 03:56，Carlos Cordobanotifications@github.com wrote：
@ChamlamLeung, thanks for reporting. This error will be fixed in our next version (4.1.4), to be released this week.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.


text:
Segmentation fault (core dumped)

Description of your problem
Hi I working with linux mint 17 64 bit,  after updating the following libs
libcuda1-352-updates (352.63-0ubuntu0.14.04.1) to 367.57-0ubuntu0.14.04.1
libcurl3 (7.35.0-1ubuntu2.9) to 7.35.0-1ubuntu2.10
libcurl3-gnutls (7.35.0-1ubuntu2.9) to 7.35.0-1ubuntu2.10
libcurl3-nss (7.35.0-1ubuntu2.9) to 7.35.0-1ubuntu2.10
libcurl3:i386 (7.35.0-1ubuntu2.9) to 7.35.0-1ubuntu2.10
libpq5 (9.3.14-0ubuntu0.14.04) to 9.3.15-0ubuntu0.14.04
I can't start spyder:
What is the expected output? What do you see instead?
[1110/095452:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
[1110/095452:ERROR:nss_util.cc(839)] After loading Root Certs, loaded==false: NSS error code: -8018
Segmentation fault (core dumped)
I tried a uninstll and reinstall direct from git and also from pip.
Nothing is working.
Any ideas?

Spyder Version: 4 and 3 both tested
Python Version: 2.7
Operating system: linux 64 bit

Dependencies
not working, cant open a gui

This looks similar to #3520. It's speculated to be a problem between PyQt 5.7 and graphic card driver, so I guess it's your libcuda update causing the problems.

Ok,
what i had is a lot of running QtWebEngineProcess.
Is it useful to switch to pyqt 5.6?

so after trying different things spyder is running?
I installed the NVIDIA-Linux-x86_64-361.42 driver and qt5.6 and pyqt5.7.
After that is running again.

Hi hofsaess
I also face the same kind of problem.
After upgrade the keras I found my spider is not open.
It shows Segmentation Fault(Core Dumped)
I use Gigabyte GEforce GTX 1080 GPU card.
Please help me how I can solve it

authors: hofsaess jitseniesen rihun


text:
Make switch to plugin shortcuts work when they are detached

Description of your problem
I would like to detach the ipython console and put it on the second screen but detaching it makes the ctrl+shift+e and ctrl+shift+i which switch between them to stop working.
When the console is not detached, the shortcuts work fine
What steps will reproduce the problem?

detach the ipython console
click on the editor
hit ctrl+shift+i

What is the expected output? What do you see instead?
should move the cursor to the ipython console
Please provide any additional information below
This was a bug in all the spyders ever I think
Version and main components

Spyder Version: 3.2.1
Python Version: 3.5.2
Qt Versions: 5.6.2, PyQt5 5.6 on Linux

Dependencies
pyflakes >=0.6.0 :  1.1.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.1.1 (OK)
pandas >=0.13.1  :  0.20.3 (OK)
numpy >=1.7      :  1.13.1 (OK)
sphinx >=0.6.6   :  1.3.5 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
jedi >=0.9.0     :  0.9.0 (OK)
psutil >=0.3     :  4.1.0 (OK)
nbconvert >=4.0  :  4.1.0 (OK)
sympy >=0.7.3    :  1.0 (OK)
cython >=0.21    :  0.23.4 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
IPython >=4.0    :  5.1.0 (OK)
pylint >=0.25    :  1.5.4 (OK)

Thanks for reporting. We're working to solve this in Spyder 4.

@dalthviz, please take a look at this one. The idea is to register the shortcut plugins (e.g. Ctrl+Shift+E to go to the Editor, Ctrl+Shift+I for the IPython console, etc) in PluginWindow.


text:
Spyder's help and code completion features stop working after resuming from extended sleep

Description of your problem
I've been experiencing this problem with Spyder for several months (maybe even years) on OSX, across multiple different machines. Currently I'm using macOS Sierra 10.12.6.
If I sleep my mac for an extended period of time with Spyder open, the help (CMD+i) and code completion features in the editor will stop working, however from within the iPython console they will continue to work.
This is difficult to reproduce, but eventually always happens. A short sleep will not cause the problem, nor will a sleep long enough to prompt a re-login.
What steps will reproduce the problem?

Open Spyder
Sleep mac for some unknown number of hours

What is the expected output? What do you see instead?
Help and code completion features in the Spyder editor are disabled.
Please provide any additional information below
Versions and main components

Spyder Version: 3.2.3
Python Version: Python 3.4.5 (but I've experienced this for multiple versions from 2.7-3.6)
Qt Version: 5.6.2
PyQt Version: 5.6
Operating system: macOS Sierra 10.12.6

Dependencies
Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
IPython >=4.0    :  6.2.1 (OK)
cython >=0.21    :  None (NOK)
jedi >=0.9.0     :  0.11.0 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
numpy >=1.7      :  1.11.3 (OK)
pandas >=0.13.1  :  0.19.2 (OK)
psutil >=0.3     :  5.3.1 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pyflakes >=0.6.0 :  1.6.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.7.4 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
rope >=0.9.4     :  0.10.7 (OK)
sphinx >=0.6.6   :  1.6.4 (OK)
sympy >=0.7.3    :  None (NOK)

Thanks for reporting. This will (probably) be solved when we merge a new architecture to provide code completions and help, which is being worked out in PR #4751.
However, that work will be part of Spyder 4, to be released next year. There's nothing we can for Spyder 3 though.

Thanks for the update. Looking forward to Spyder 4!

For reference, I believe I am experiencing the same problem after sleep on Windows 10 Enterprise x64 with 3.2.3 - 3.2.4; as I put the machine to sleep in the middle of spyder sessions, and later come back (often much later) and completion, help etc. often mysteriously has stoped working in the editor but not the console. Therefore, it appears to be a cross platform issue.

Also, I can confirm this also happens anytime I lock my screen, i.e. as I'm supposed to whenever I step away from my machine, which essentially means I need to restart spyder every time I do so or miss out on help, completion, introspection, etc....obviously, a pretty large hit to productivity.
So, to confirm, there isn't any easy-ish way to patch/mitigate this bug without completely reworking the whole completion/introspection architecture—it isn't just some timeout or something somewhere? If not, is there anything short of a full Spyder close and relaunch that would serve to get it working again? If so, maybe we could implement an internal console command or GUI button somewhere to restart jedi/rope/whatever is breaking to fix it? Seems a hackish mitigation, but the alternatives are either a full close/restart cycle every time one leaves their machine for a few moments, or living with a large chunk of Spyder's functionality being disabled much of the time...

I can't reproduce it on Linux, so I don't know how to fix it. You can start Spyder with debug facilities turned on by running
set SPYDER_DEBUG "3"

and then starting Spyder from the command line to better understand what happens.

Okay, thanks much. I'll try to take a look a little later this week after I work on the FAQ, etc.

This should be fixed by our new code completion architecture.

@ccordoba12 is this new architecture in a current release? If so I can update and report if the issue is gone.

@trianta2, it'll be part of Spyder 4 and it'll be part of our beta2 version, to be released in a couple of weeks.
If you don't want to install our beta, you'll have to wait until January for the final version. In any case, you're welcome to report back.

@trianta2 You can also test it now by cloning this Github repo, making an Anaconda environment with the right dependencies (in the requirements/requirements.txt file) and running python bootstrap.py in the main directory. However, do note it isn't fully stable yet and there are some kinks still to be worked out with the brand new architecture before we release it.

this is still happening with spyder 3.3.1 on windows 7

@venkatgmrit05 Please read @ccordoba12 's comment right above yours. As a quick update, we've delayed the release of Beta 2 to December to conduct additional testing on various OSes to make sure the new architecture is indeed much more stable and doesn't have these issues.

@venkatgmrit05 Please read @ccordoba12 's comment right above yours. As a quick update, we've delayed the release of Beta 2 to December to conduct additional testing on various OSes to make sure the new architecture is indeed much more stable and doesn't have these issues. Of course, we'd welcome your help in testing it once it is released, so we can iron out any remaining issues. Thanks.

gotcha! thank you,. looking forward to it :)

I am also having this problem macos 10.14.6. Spyder opened through anaconda. Any solution so far?
Best

This is probably going to be fixed in Spyder 4, to be released in a month or so.

Thanks!

Any update on this? I am still experiencing seemingly random stops in spyder. Anytime its left alone for a length of time it just stops completing inside the editor.

@mxardre As @ccordoba12 said, this has mostly been fixed in Spyder 4, of which 7 betas have already been released and the next release AFAIK should be the release candidate build, the final stage before a release. You can try out the betas now to see if it resolves the issue, and track the real-time progress of the release with the 4.0rc and the 4.0.0 final milestones.

So when will this be patched in the non-beta spyder? This is a rather small, but very inconvenient bug.

@Travis-Barton It already is as of a few days ago, as Spyder 4.0.0rc1 has been released, which as the name suggests is formally a release candidate rather than a beta (though, technically speaking, what the Spyder team has referred to as "betas" are really much closer to the definition of alphas, and the release candidate closer to a beta by the standard convention). Spyder 4.0.0 final should be out very soon; you can track the progress toward the same in by following the relevant milestone on Github.

@Travis-Barton It already is as of a few days ago, as Spyder 4.0.0rc1 has been released, which is labelled a release candidate rather than a beta (as a clarification, what the Spyder team has referred to as betas are usually termed alphas since they add major features, and the release candidate is what would more typically be called a final beta since a followup final release was always planned, but to be clear that is not a negative judgement on their quality/stability and I've used the betas as my daily driver for the past year since Spyder 4 beta 2 and they are relatively stable now).
Spyder 4.0.0 final should be out very soon; you can track the progress toward the same in by following the relevant milestone on Github.

Taking a look at the release notes I see several quality of life features that I am exited about! I can't wait to start using it!

In case this is not understood yet and new anecdotal observations add to the clues:
I seem to have this problem (autocomplete stops working, in Editor but not IPython, after putting Win10 to sleep)
with Spyder 4.1.3
but not with 4.1.2.
To confirm, after Win10 sleep:
Spyder 4.1.2 Autocomplete as expected.
Spyder 4.1.3 Autocomplete not operating in Editor.
Please let me know if more details would help.

Thanks for the detailed information! Its quite likely a different issue since the completion infrastructure is almost completely redone from what was there before, particularly the parts that OS sleep is likely to affect. However, that's a potentially very interesting result, if a Spyder change really did prompt completion to stop working in this scenario.
However, I was not able to reproduce this behavior on either my clean Win 10 1909 test box running Spyder 4.1.3, with clean prefs and a clean slate of the latest Spyder dependencies installed (most notably Spyder-Kernels 1.9.1, Jedi 0.15.2, Python-Language-Server 0.31.10, Rope 0.17.0, Parso 0.5.2, nor on either Spyder 4.1.2 or Spyder 4.1.3 on my primary Win 8.1 machine under the same deps, both under Python 3.7. In all cases, after short or long (multi-minute) sleep, completion, help and other LSP services worked from the Editor as expected.
If you can provide a complete conda list output for the environment in which you were running Spyder, as well as any information you have (e.g. conda install or conda update output) on any other dependencies that changed between one version and the other, that would be very helpful. Furthermore, can you reproduce this behavior in a fresh, clean environment installing Spyder 4.1.3? Thanks!

I wonder if there is any relation to #12259. Currently, Jedi 0.15.2 does not use a clean environment when launched, and while this may only affect non-conda environments, I'm curious to know whether system variables are changed over some period of time by the system, then, if the LSP (and Jedi) are ever restarted (as can happen normally) an offending variable is picked up by Jedi causing unstable behavior. Just an outlandish theory...

@CAM-Gerlach  Sorry i also have this issue now on 4.1.2 after sleeping Win10.1809 overnight (multi-hour).
Both Spyder installs (4.1.2 and 4.1.3) are from Anaconda 1.9.12, Conda 4.8.3. No Pip use at all on these envs.
Linking to other envs otherwise well via spyder-kernels 1.9.1
Python 3.7.7
jedi 0.15.2
rope 0.17.0
parso 0.5.2
python-language-server 0.31.10
pyqt 5.9.2
ipython 7.13.0

@JonB451, could you apply the patch in #12771 to your installation and try again?

@ccordoba12 I'm not a coder by trade so i'm not sure of the normal way to do that. My hack is to just edit that file with that one line of code change. I've done that and restarted Spyder fine. Will have to get back to you when Win has been in a long sleep, probably <24 hours. Hope that's ok.

My hack is to just edit that file with that one line of code change

That's fine.

Will have to get back to you when Win has been in a long sleep, probably <24 hours. Hope that's ok.

Ok, thanks for your help!

@ccordoba12 After patch #12771 then first long sleep: All good (Editor completion and ctrl+I).
Next update in about 48 hours or if problem before then.

@ccordoba12 About an hour later, without an OS sleep, completion has stopped working.
I cannot be exactly sure when that was triggered but at the same time i noticed another problem which i had not before. I added one line near the top of the code so all the functions were pushed down one line. The little triangles next to the line numbers which allow you to collapse (fold?) a function did not move with the function and were still trying to operate on the now empty lines. Is this related to Linter?

@JonB451 , does restarting the LSP server from the statusbar return proper functionality?

About an hour later, without an OS sleep, completion has stopped working.

Sorry to hear that. It was confirmed by another user (and me), that #12771 fixes this problem on Windows, so I don't know what else could be happening.

The little triangles next to the line numbers which allow you to collapse (fold?) a function did not move with the function and were still trying to operate on the now empty lines. Is this related to Linter?

Yeah, linting and folding depend on the same server, so if one dies, the other dies too.

I would guess that whatever followup issue issue @JonB451 just reported is not directly related to this one, then, given that the behavior is different?

@mrclary Yes it does! Thanks.

@JonB451 That would also be a more than acceptable workaround. Could you explain to me how to restart the LSP server from the status bar? Does this require Kite to be installed? Thanks.

Hi @quamobrem I don't have Kite installed. In the status bar at the bottom of Spyder, amongst other statuses, is the "LSP Python" status. If you clik on it then you a pop up gives you the option to "Restart Python Language Server".  That's it :-) Hope it works for you.

Closing because a problem like this hasn't been reported in a long time.


text:
Starting Spyder for the first time after a new installation of Anaconda

Description
What steps will reproduce the problem?

Launch Spyder from Anaconda Navigator.

What is the expected output? What do you see instead?
Please provide any additional information below
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 2489, in execute_in_external_console
console.execute_code(lines)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 970, in execute_code
sw.execute(to_text_string(lines))
File "C:\ProgramData\Anaconda3\lib\site-packages\qtconsole\history_console_widget.py", line 47, in execute
source, hidden, interactive)
File "C:\ProgramData\Anaconda3\lib\site-packages\qtconsole\console_widget.py", line 632, in execute
self._execute(source, hidden)
File "C:\ProgramData\Anaconda3\lib\site-packages\qtconsole\frontend_widget.py", line 294, in _execute
msg_id = self.kernel_client.execute(source, hidden)
AttributeError: 'NoneType' object has no attribute 'execute'
Version and main components

Spyder Version: 3.2.6
Python Version: 3.6.4
Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies
pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.22.0 (OK)
numpy >=1.7      :  1.14.0 (OK)
sphinx >=0.6.6   :  1.6.6 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.27.3 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.2.1 (OK)
pylint >=0.25    :  1.8.2 (OK)

Thanks for reporting. This is a duplicate of #6308 , which was fixed in Spyder 3.2.7. Please update with conda update spyder from the Anaconda Prompt.

authors: CAM-Gerlach richdevboston


text:
AttributeError: module 'spyder_kernels.utils.iofuncs' has no attribute 'iofunctions'

can not open spyder3.3.0 in Manjaro x64
error here:
[captain@captain-pc ~]$ spyder3
Traceback (most recent call last):
File "/usr/sbin/spyder3", line 7, in
from spyder.app.start import main
File "/usr/lib/python3.6/site-packages/spyder/app/start.py", line 27, in
from spyder.config.main import CONF
File "/usr/lib/python3.6/site-packages/spyder/config/main.py", line 21, in
from spyder.config.fonts import BIG, MEDIUM, MONOSPACE, SANS_SERIF
File "/usr/lib/python3.6/site-packages/spyder/config/fonts.py", line 14, in
from spyder.config.utils import is_ubuntu
File "/usr/lib/python3.6/site-packages/spyder/config/utils.py", line 56, in
IMPORT_EXT = list(iofuncs.iofunctions.load_extensions.values())
AttributeError: module 'spyder_kernels.utils.iofuncs' has no attribute 'iofunctions'

Please read our
https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ
If you are unable to fix the problem after that, please install Anaconda instead. Unfortunately, we don't have the resources nor the time to help people with custom installations, so it's up to you to figure this one out.
This is because custom installations are for experts or very knowledgeable people who really know what they are doing and are able to easily solve problems like this.

success to start spyder3.2.8,but fail to start spyder3.3.0.

As I said, if you're unwilling to use Anaconda, you're basically on your own. Sorry, but we have to save our time to solve the long list of bugs users have reported and implement new features.


text:
PR: Move breakpoints to new API

Description of Changes

[ ] Wrote at least one-line docstrings (for any new functions)
[ ] Added unit test(s) covering the changes (if testable)

[ ] Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved

Fixes #
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @goanpeca

Hello @goanpeca! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file spyder/plugins/breakpoints/widgets/breakpointsgui.py:

Line 318:1: W293 blank line contains whitespace

This one is ready for review @ccordoba12


text:
PR: Remove arrows config in macOS qss file

Description of Changes

[ ] Wrote at least one-line docstrings (for any new functions)
[ ] Added unit test(s) covering the changes (if testable)

[ ] Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved

Fixes #13191
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

Before:

After:

That works!

@impact27, thanks a lot for your help!
I think that since this PR removes the need to set those arrows in the stylesheet, we should remove the files corresponding to them too. Those are the following:

spyder/images/chevron-left.png
spyder/images/chevron-left.svg
spyder/images/chevron-left@2x.png
spyder/images/chevron-right.png
spyder/images/chevron-right.svg
spyder/images/chevron-right@2x.png

@goanpeca, do you agree?

Sure.


text:
PR: Don't send requests to the PyLS until it's been properly initialized

In previous versions we were sending some requests before the server responded to our initialize request, which is not expected according to the protocol. That was causing problems when reloading the previous active project at startup.
This also fixes the ordering of requests we send to the LSP server at startup.
Fixes #13351.
TODO:

[x] Add some tests to prevent regressions.
[x] Fix scrolling in the internal console.

Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file spyder/app/mainwindow.py:

Line 107:1: E402 module level import not at top of file

Hey @ccordoba12, I've tested this locally and this doesn't solve https://github.com/spyder-ide/spyder/issues/13897.
When starting Spyder, the outline explorer only populates for the file that is focused. When switching file, the tree for that file is not populated automatically. A change needs to be made to the file to trigger the update.

When starting Spyder, the outline explorer only populates for the file that is focused. When switching file, the tree for that file is not populated automatically. A change needs to be made to the file to trigger the update.

As I told @jnsebgosselin on issue #13928, that bug is caused by another reason. I'm preparing another PR with a fix for it.

Ok, I understand. Sorry for posting that here. I am a little bit confused since what I reported in issue #13928 isn't related to the problem I showed in https://github.com/spyder-ide/spyder/pull/13828#issuecomment-704253703, but I'm happy if this is taken care of.


text:
[WIP] PR: Add parent reference to dialogs to ensure correct setup of the dark theme

Pull Request Checklist

[x] Read and followed this repo's Contributing Guidelines
[x] Based this PR on the latest version of the correct branch (master or 3.x)
[x] Followed PEP 8 code style
[x] Ensured this pull request hasn't eliminated unrelated blank lines/spaces,
modified the spyder/defaults directory, or added new icons/assets
[x] Described the changes and the motivation for them below
[x] Noted what issue(s) this pull request resolves, creating one if needed
[ ] Included a screenshot, if this PR makes any visible changes to the UI

Developer Certificate of Origin Affirmation
By submitting this Pull Request or typing my name below, I affirm the
Developer Certificate of Origin
with respect to both the content of the contribution itself and this post,
and understand I am releasing it under Spyder's MIT (Expat) license.

Description of Changes

Setup parent reference to dialogs to ensure the set up of the dark style sheet for the dark theme.
Issue(s) Resolved

Part of #8068

Hello @dalthviz! Thanks for updating the PR.

There are no PEP8 issues in the file spyder/app/mainwindow.py !

There are no PEP8 issues in the file spyder/plugins/profiler/widgets/profilergui.py !

There are no PEP8 issues in the file spyder/widgets/github/backend.py !

There are no PEP8 issues in the file spyder/widgets/reporterror.py !

@ccordoba12 a preview:
Profiler output:

Dependencies:

Github Authentication:


text:
Internalizer with read only property

Internalizer with read only property doesn't work - it fails with "Property is not writable". Here is test case:
using System;

public class ClassWithReadOnlyProperty
{
    private ComplexProperty _property = new ComplexProperty {SomeString = "Initial"};

    public ComplexProperty Property
    {
        get { return _property; }
    }
}

public class ComplexProperty
{
    public string SomeString { get; set; }
}

public static class Program {
    public static void Main (string[] args) {
        var instance = new ClassWithReadOnlyProperty
        {
            Property = { SomeString = "Modified" }
        };

        Console.WriteLine(instance.Property.SomeString);
    }
}

I'll look on this issue later today.

Works, test to be added?

repo: sq/JSIL

license: mit


text:
fix(codegen/golang): support name type

close #2714

This seems safe to merge, but I'm having a hard time determining where these types are defined, and whether we need to add support for more types defined in similar places?

https://www.postgresql.org/docs/current/datatype-character.html#DATATYPE-CHARACTER-SPECIAL-TABLE

Good find, thanks.

authors: andrewmbenton orisano

repo: sqlc-dev/sqlc


text:
Test-DbaSpn, fixes #2261

Thanks to @banditkd for being an active supporter ^_^
Type of Change

[x] Bug fix (non-breaking change, fixes #2261)
[ ] New feature (non-breaking change, adds functionality)
[ ] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose
Supporting MSAs and gMSAs
Approach
Adding another search path logic was needed because ultimately MSAs and gMSAs are System.DirectoryServices.AccountManagement.ComputerPrincipal . Everything else lined up pretty quickly (i.e. Set-DbaSpn works without issues)

yall are awesome, thank you! 😎

All @niphlod. All I did was use some of that free azure credit that I have built up over the years. ;)

authors: banditkd niphlod potatoqualitee

repo: sqlcollaborative/dbatools


text:
Update Select-DbaBackupInformation.ps1 Description

change the description to something like:
.DESCRIPTION
Select-DbaBackupInformation filters out a subset of backups from the dbatools backup history object with parameters supplied.

Type of Change

[ ] Bug fix (non-breaking change, fixes #)
[ ] New feature (non-breaking change, adds functionality)
[ ] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] Nunit test is included
[x] Documentation
[ ] Build system

Purpose

Approach

Commands to test

Screenshots

Learning

oh, thank you! 👍

authors: deanwest potatoqualitee


text:
Postgres PARTITION BY not supported

SQLDelight Version
2.0.2
SQLDelight Dialect
postgres
Describe the Bug
The following valid SQL statement isn't supported:
SELECT ranked_profiles.* FROM
(SELECT profile.*,
  rank() OVER (PARTITION BY gender ORDER BY updated DESC)
  FROM profile) ranked_profiles
WHERE rank <= 10
ORDER BY updated DESC

Stacktrace
<compound operator real>, FOR, FROM, GROUP, HAVING, LIMIT, OFFSET, ORDER or WHERE expected, got '('
19    SELECT ranked_profiles.* FROM
20    (SELECT profile.*,
21      rank() OVER (PARTITION BY gender ORDER BY updated DESC)
                    ^

Try the snapshot version "2.1.0-SNAPSHOT" - I added support a while ago https://github.com/sqldelight/sqldelight/blob/f79bd8ae2cf991de6dccdb643376253402f665e1/sqldelight-gradle-plugin/src/test/integration-postgresql/src/main/sqldelight/app/cash/sqldelight/postgresql/integration/WindowFunctions.sq#L28
Though, you may have to tweak the sql a little to resolve the synthetic  columns
See if you have any luck with
SELECT ranked_profiles.* FROM
(SELECT profile.*,
  rank() OVER (PARTITION BY gender ORDER BY updated DESC) rank
  FROM profile) ranked_profiles
WHERE ranked_profiles.rank <= 10
ORDER BY ranked_profiles.updated DESC;

You're a legend @griffio! This works really well, thanks for implementing this.

authors: griffio vanniktech

repo: sqldelight/sqldelight


text:
Crash in newCall().execute()

Hi,
I am getting a crash in my mobile app in your utility.  To narrow it down and exclude other factors, I created an empty test project and used the sample code you provided.  My code is below.  I put in some logging to see where it crashes.  The line it crashes on is:
Response response = client.newCall(request).execute();
It gets to the "finally" block in the "try" statement.  I am using Android Studio v1.2.  I am using OKHttp v2.3 and OKIO v1.3.
Any help is appreciated.
Thanks!

class GetExample {
OkHttpClient client = new OkHttpClient();
String run(String url) throws IOException {
    Request request = new Request.Builder()
            .url(url)
            .build();

    Response response = client.newCall(request).execute();
    return response.body().string();
}

}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Logs logs = new Logs();
    try {
        GetExample example = new GetExample();
        String response = example.run("https://raw.github.com/square/okhttp/master/README.md");
    } catch (IllegalArgumentException e) {
        logs.LogMessage("ERROR_MALFORMED_URL");
    } catch (SocketTimeoutException e) {
        logs.LogMessage("ERROR_CONNECTION_ERROR");
    } catch (UnknownHostException e) {
        logs.LogMessage("ERROR_UNKNOWN_HOST");
    } catch (IOException e) {
        logs.LogMessage("ERROR_IO_ERROR");
    } catch (NullPointerException e) {
        logs.LogMessage("ERROR_CONNECTION_ERROR");
    } finally {
        logs.LogMessage("catch->finally");
    }
}

Do you get a stacktrace?

Thanks for the quick reply!
Full thread dump
"FinalizerDaemon@3782" daemon prio=5 waiting
java.lang.Thread.State: WAITING
blocks FinalizerDaemon@3782
at java.lang.Object.wait(Object.java:-1)
at java.lang.Object.wait(Object.java:422)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:101)
- locked <0xecc> (a java.lang.ref.ReferenceQueue)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:72)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:173)
at java.lang.Thread.run(Thread.java:820)
"main@3563" prio=5 runnable
java.lang.Thread.State: RUNNABLE
at android.os.BinderProxy.transactNative(Binder.java:-1)
at android.os.BinderProxy.transact(Binder.java:496)
at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:4100)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:89)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
"FinalizerWatchdogDaemon@3781" daemon prio=5 waiting
java.lang.Thread.State: WAITING
blocks FinalizerWatchdogDaemon@3781
at java.lang.Object.wait(Object.java:-1)
at java.lang.Daemons$FinalizerWatchdogDaemon.waitForObject(Daemons.java:239)
- locked <0xecb> (a java.lang.Daemons$FinalizerWatchdogDaemon)
at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:211)
at java.lang.Thread.run(Thread.java:820)
"GCDaemon@3779" daemon prio=5 waiting
java.lang.Thread.State: WAITING
blocks GCDaemon@3779
at java.lang.Object.wait(Object.java:-1)
at java.lang.Daemons$GCDaemon.run(Daemons.java:341)
- locked <0xeca> (a java.lang.Daemons$GCDaemon)
at java.lang.Thread.run(Thread.java:820)
"HeapTrimmerDaemon@3780" daemon prio=5 waiting
java.lang.Thread.State: WAITING
blocks HeapTrimmerDaemon@3780
at java.lang.Object.wait(Object.java:-1)
at java.lang.Daemons$HeapTrimmerDaemon.run(Daemons.java:310)
- locked <0xecd> (a java.lang.Daemons$HeapTrimmerDaemon)
at java.lang.Thread.run(Thread.java:820)
"ReferenceQueueDaemon@3783" daemon prio=5 waiting
java.lang.Thread.State: WAITING
blocks ReferenceQueueDaemon@3783
at java.lang.Object.wait(Object.java:-1)
at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:133)
- locked <0x5c6> (a java.lang.Class)
at java.lang.Thread.run(Thread.java:820)
"Signal Catcher@3778" daemon prio=5 waiting
java.lang.Thread.State: WAITING
Incompatible thread state: thread not suspended
"Binder_1@3784" prio=5 runnable
java.lang.Thread.State: RUNNABLE
Incompatible thread state: thread not suspended
"Binder_2@3785" prio=5 runnable
java.lang.Thread.State: RUNNABLE
Incompatible thread state: thread not suspended

I don't see what the crash is.

What is that uncaughtException?

On Android Studio, he would like you to copy a stack trace where full exception occurs in the logcat window, then paste it to here.

I'm mainly a Windows developer.  How do I do that?

I think I got it.
05-16 21:27:13.342  30213-30213/com.powerlobbies.test I/art﹕ Not late-enabling -Xcheck:jni (already on)
05-16 21:27:13.365  30213-30213/com.powerlobbies.test W/ActivityThread﹕ Application com.powerlobbies.test is waiting for the debugger on port 8100...
05-16 21:27:13.378  30213-30213/com.powerlobbies.test I/System.out﹕ Sending WAIT chunk
05-16 21:27:13.521  30213-30220/com.powerlobbies.test W/art﹕ Suspending all threads took: 16.321ms
05-16 21:27:13.522  30213-30220/com.powerlobbies.test I/art﹕ Debugger is active
05-16 21:27:13.738  30213-30213/com.powerlobbies.test I/System.out﹕ Debugger has connected
05-16 21:27:13.739  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:13.950  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:14.159  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:14.377  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:14.589  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:14.799  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:15.010  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:15.220  30213-30213/com.powerlobbies.test I/System.out﹕ waiting for debugger to settle...
05-16 21:27:15.430  30213-30213/com.powerlobbies.test I/System.out﹕ debugger has settled (1365)
05-16 21:27:15.614  30213-30213/com.powerlobbies.test D/AndroidRuntime﹕ Shutting down VM
05-16 21:27:15.614  30213-30213/com.powerlobbies.test E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.powerlobbies.test, PID: 30213
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.powerlobbies.test/com.powerlobbies.test.MainActivity}: android.os.NetworkOnMainThreadException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147)
at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at com.squareup.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29)
at com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:224)
at com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:193)
at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:113)
at com.squareup.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:344)
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:329)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:319)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
at com.squareup.okhttp.Call.getResponse(Call.java:271)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:228)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:199)
at com.squareup.okhttp.Call.execute(Call.java:79)
at com.powerlobbies.test.GetExample.run(MainActivity.java:27)
at com.powerlobbies.test.MainActivity.onCreate(MainActivity.java:42)
at android.app.Activity.performCreate(Activity.java:5937)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
05-16 21:27:55.685  30213-30220/com.powerlobbies.test W/art﹕ Suspending all threads took: 5.824ms

You cannot do synchronous HTTP on the main thread. Use enqueue not execute
to run the request asynchronously.
On Sat, May 16, 2015, 9:32 PM T7777 notifications@github.com wrote:

I think I got it.
05-16 21:27:13.342 30213-30213/com.powerlobbies.test I/art﹕ Not
late-enabling -Xcheck:jni (already on)
05-16 21:27:13.365 30213-30213/com.powerlobbies.test W/ActivityThread﹕
Application com.powerlobbies.test is waiting for the debugger on port
8100...
05-16 21:27:13.378 30213-30213/com.powerlobbies.test I/System.out﹕ Sending
WAIT chunk
05-16 21:27:13.521 30213-30220/com.powerlobbies.test W/art﹕ Suspending all
threads took: 16.321ms
05-16 21:27:13.522 30213-30220/com.powerlobbies.test I/art﹕ Debugger is
active
05-16 21:27:13.738 30213-30213/com.powerlobbies.test I/System.out﹕
Debugger has connected
05-16 21:27:13.739 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:13.950 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:14.159 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:14.377 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:14.589 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:14.799 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:15.010 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:15.220 30213-30213/com.powerlobbies.test I/System.out﹕ waiting
for debugger to settle...
05-16 21:27:15.430 30213-30213/com.powerlobbies.test I/System.out﹕
debugger has settled (1365)
05-16 21:27:15.614 30213-30213/com.powerlobbies.test D/AndroidRuntime﹕
Shutting down VM
05-16 21:27:15.614 30213-30213/com.powerlobbies.test E/AndroidRuntime﹕
FATAL EXCEPTION: main
Process: com.powerlobbies.test, PID: 30213
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.powerlobbies.test/com.powerlobbies.test.MainActivity}:
android.os.NetworkOnMainThreadException
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: android.os.NetworkOnMainThreadException
at
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147)
at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at
com.squareup.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29)
at
com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:224)
at
com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:193)
at
com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:113)
at
com.squareup.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:344)
at
com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:329)
at
com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:319)
at
com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
at com.squareup.okhttp.Call.getResponse(Call.java:271)
at
com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:228)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:199)
at com.squareup.okhttp.Call.execute(Call.java:79)
at com.powerlobbies.test.GetExample.run(MainActivity.java:27)
at com.powerlobbies.test.MainActivity.onCreate(MainActivity.java:42)
at android.app.Activity.performCreate(Activity.java:5937)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at
android.app.ActivityThread.access$800(ActivityThread.java:144)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
05-16 21:27:55.685 30213-30220/com.powerlobbies.test W/art﹕ Suspending all
threads took: 5.824ms
—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/1656#issuecomment-102720255.

Thanks Jake.  I tried enqueue(), but it fails at the same location and there is a ton of entries on the stack, so I am still looking into it.

I think at this point your best bet is to go to stackoverflow. This tracker is for bug reports & feature requests only; I think you're just suffering the pain of Android's main thread.

Yes, now that I know it's a thread issue I am going down that path.  Thanks for the help!

authors: JakeWharton T7777 iNoles swankjesse

repo: square/okhttp


text:
Fatal Exception: ArrayIndexOutOfBoundsException in Hpack.java

Okhttp version: 3.9.1
Retrofit version: 2.3.0

Received crash report from SM-G950F on Android 7.0.
Stacktrace
Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=8; index=8        at okhttp3.internal.http2.Hpack$Reader.getName(Hpack.java:265)        at okhttp3.internal.http2.Hpack$Reader.readLiteralHeaderWithIncrementalIndexingIndexedName(Hpack.java:250)        at okhttp3.internal.http2.Hpack$Reader.readHeaders(Hpack.java:195)        at okhttp3.internal.http2.Http2Reader.readHeaderBlock(Http2Reader.java:196)        at okhttp3.internal.http2.Http2Reader.readHeaders(Http2Reader.java:182)        at okhttp3.internal.http2.Http2Reader.nextFrame(Http2Reader.java:129)        at okhttp3.internal.http2.Http2Connection$ReaderRunnable.execute(Http2Connection.java:566)        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)        at java.lang.Thread.run(Thread.java:762)

Not sure if this is a purely client bug, but even assuming an invalid server response, this should fail a single connection (IOException), closing all streams and not kill the client instance or the app.

This is fixed.

authors: AndrazP swankjesse yschimke


text:
Could not get anything from Nominatim in my Android app.

Here is the code:
val client : OkHttpClient = OkHttpClient()
        val builder = "https://nominatim.openstreetmap.org/reverse?".toHttpUrlOrNull()?.newBuilder()
        builder?.addQueryParameter("format", "json")
        builder?.addQueryParameter("lat", latitude.toString())
        builder?.addQueryParameter("lon", longitude.toString())
        builder?.addQueryParameter("zoom", "18")
        builder?.addQueryParameter("addressdetails", "1")
        builder?.addQueryParameter("accept-language", language)
        val request = Request.Builder()
            .url(builder.toString())
            .addHeader("User-Agent", useragent)
            .addHeader("Referer", "https://github.com/sun-jiao/LocalizedGeocoder/")
            .build()
        val call: Call = client.newCall(request)
        var response0: Response? = null
        call.enqueue(object : Callback {
            override fun onFailure(call: Call, e: java.io.IOException) {
            }
            override fun onResponse(call: Call, response: Response) {
                try {
                    response0 = response
                } catch (e: JSONException) {}
            }
        })
        Log.i(TAG, request.toString())
        Log.i(TAG, response0.toString())

And this is the Android log:
2020-03-25 13:51:16.420 27989-27989/sunjiao.geocoder I/Nominatim: Request{method=GET, url=https://nominatim.openstreetmap.org/reverse?&format=json&lat=29.99&lon=119.99&zoom=18&addressdetails=1&accept-language=zh-cn, headers=[User-Agent:SunjiaoLocalizedGeocoderSample 1.0.0, Referer:https://github.com/sun-jiao/LocalizedGeocoder]}
2020-03-25 13:51:16.420 27989-27989/sunjiao.geocoder I/Nominatim: null

that means I get null response.
I asked Nominatim developer firstly, and they think it's a problem of okhttp.
https://github.com/openstreetmap/Nominatim/issues/1717

call.enqueue is an async operation.  Please ask usage questions like this on stackoverflow.

authors: sun-jiao yschimke


text:
Further constrain when we recover from failed routes.

Don't recover if we encounter a read timeout after sending the request, but
do recover if we encounter a timeout building a connection.
See https://github.com/square/okhttp/issues/2394

LGTM!

authors: JakeWharton swankjesse


text:
Cancel calls on unexpected exceptions (3.12.x branch)

Closes: https://github.com/square/okhttp/issues/5151

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:16 min
[INFO] Finished at: 2019-09-27T00:19:59-04:00
[INFO] ------------------------------------------------------------------------


text:
Query.mapToOne and take(1) on an originally empty table doesn't get any item emissions

When a table is originally empty, I would expect Query.mapToOne to emit nothing until the table gets populated. So if I want to create a sqlbrite observable that listens to the table until the table gets populated with the expected value, I would do something like this:
db.createQuery(...).mapToOne(...).take(1).subscribe(...);
However, it seems that take(1) somehow causes sqlbrite to stop listening to the table triggers despite the fact that no items have been emitted from the upstream observable. If I switch the above code to use take(2) or mapToOneOrDefault(...).take(2), then I would properly get a ping downstream when the table gets populated.
I can't find a reliable repro step with just rx streams which makes me think that it's something that sqlbrite is doing.
I am also able to reproduce this in the sample app provided here. Simply add a dummy table tmp, and run the following code in ListFragment#onResume.

db.delete("tmp", null);
db.createQuery("tmp", "SELECT * FROM tmp")
        .mapToOne(new Func1<Cursor, Object>() {
          @Override
          public Object call(Cursor cursor) {
            return new Object();
          }
        })
        .doOnNext(new Action1<Object>() {
          @Override
          public void call(Object o) {
            System.out.println("Received item");
          }
        })
        .take(1)
        .subscribe();

Observable.timer(5, TimeUnit.SECONDS)
        .subscribe(new Action1<Long>() {
          @Override
          public void call(Long aLong) {
            final ContentValues cvs = new ContentValues();
            cvs.put("text", "TEXT");
            db.insert("tmp", cvs);
          }
        });

What happens in the above code is that if I leave it as take(1), then I never get the Received item print. However, if I change it to take(2), I properly get the Received item callback.

Yep, as I thought on Slack this is indeed backpressure-related. We need to track request counts through our custom operator and re-request when we swallow an event.

authors: JakeWharton jinatonic

repo: square/sqlbrite