UICollectionViewCell fails to relayout its subviews when UICV layout is invalidated - layout
I wrote a more detailed blog post on this problem, but here's the gist. I have embedded UICollectionView inside another UIViewController. When the container view changes its bounds, collection view also changes its bounds, which trigger its UICollectionViewLayout to re-layout as well.
All is well except that cells do not re-use new frame and layout using old bounds.
This is the log from important methods, where it's obvious that layoutSubviews is using wrong (old) frame.
__57-[RTColumnViewController processCalculatorKeypadVisible:]_block_invoke
-[RTUnitLayout shouldInvalidateLayoutForBoundsChange:] : YES, {{0, 1014}, {272, 375}} -> {{0, 1014}, {175, 375}}
-[RTUnitLayout prepareLayout], bounds={{0, 1014}, {175, 375}}, itemsize={175, 89}
-[RTUnitLayout prepareForAnimatedBoundsChange:] : {{0, 1014}, {272, 375}} -> {{0, 1014}, {175, 375}}
-[RTUnitLayout layoutAttributesForElementsInRect:] : rect={{0, 667}, {175, 1334}}
__50-[RTUnitLayout layoutAttributesForElementsInRect:]_block_invoke_2 : <NSIndexPath: 0xc000000000048016> {length = 2, path = 0 - 9} frame={{0, 801}, {175, 89}}
__50-[RTUnitLayout layoutAttributesForElementsInRect:]_block_invoke_2 : <NSIndexPath: 0xc000000000058016> {length = 2, path = 0 - 11} frame={{0, 979}, {175, 89}}
...
-[RTUnitLayout finalLayoutAttributesForDisappearingItemAtIndexPath:] : <NSIndexPath: 0xc000000000058016> {length = 2, path = 0 - 11} frame={{0, 979}, {272, 89}}
-[RTUnitLayout initialLayoutAttributesForAppearingItemAtIndexPath:] : <NSIndexPath: 0xc000000000058016> {length = 2, path = 0 - 11} frame={{0, 979}, {175, 89}}
-[RTUnitCell layoutSubviews] : pre-super: {{0, 979}, {272, 89}}
-[RTUnitCell layoutSubviews] : post-super: {{0, 979}, {272, 89}}
...
-[RTUnitLayout finalizeAnimatedBoundsChange] : {{0, 1014}, {175, 375}}
__57-[RTColumnViewController processCalculatorKeypadVisible:]_block_invoke623 : completed
After it's done, if I just lightly scroll the UICV, it will trigger re-display and all cells will be shown as they should be. I'm just stumped why this does not happen during the original animation, when it should.
Any ideas..?
Got back from Apple engineers. If you have custom subclass of UICollectionViewLayoutAttributes, don't make a stupid mistake like I did and return YES form isEqual: method.
It must be:
- (BOOL)isEqual:(id)other {
...
return [super isEqual:other];
}
More details in my blog post.
Related
Backup Sharepoint Online with Azure functions
Is there a way to generate a sharepoint backup online using azure functions? I have already authenticated the tenant using managed identity The idea would be to download all the files in the documents and upload them to an azure storage account I used this code but I get an error: using namespace System.Net param($Request, $TriggerMetadata) $TenantSiteURL = "https://tenant.sharepoint.com" $SiteRelativeURL = "/sites/BackupSource" $LibraryName = "Documenti Condivisi" $DownloadPath ="\Temp\Docs" #Connect-PnPOnline -ManagedIdentity Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity Write-Warning "Connesso" #Set-Location -Path SPO:\$SiteRelativeURL Get-PnPMicrosoft365Group Push-OutputBinding -Name Response -Value ([HttpResponseContext]#{ StatusCode = [HttpStatusCode]::OK }) 2022-01-03T16:58:32.983 [Information] Executing 'Functions.HttpTrigger1' (Reason='This function was programmatically called via the host APIs.', Id=09c1fe95-6b6e-4e85-8c8f-815e37e99d04) 2022-01-03T16:58:40.915 [Information] OUTPUT: 2022-01-03T16:58:41.541 [Information] OUTPUT: Account SubscriptionName TenantId Environment 2022-01-03T16:58:41.542 [Information] OUTPUT: ------- ---------------- -------- ----------- 2022-01-03T16:58:41.549 [Information] OUTPUT: MSI#50342 --- AzureCloud 2022-01-03T16:58:41.549 [Information] OUTPUT: 2022-01-03T16:58:43.530 [Error] ERROR: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.Exception :Type : System.Management.Automation.ParameterBindingExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.ErrorId : AmbiguousParameterSetLine : 13Offset : 1CommandInvocation :MyCommand : Connect-PnPOnlineBoundParameters :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys : …Values : …SyncRoot : …ScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1InvocationName : Connect-PnPOnlinePipelineLength : 1PipelinePosition : 1CommandOrigin : InternalErrorRecord :Exception :Type : System.Management.Automation.ParentContainsErrorRecordExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.HResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParentContainsErrorRecordExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13TargetSite :Name : ThrowAmbiguousParameterSetExceptionDeclaringType : System.Management.Automation.CmdletParameterBinderController, System.Management.Automation, Version=7.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllStackTrace :at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)at System.Management.Automation.CommandProcessor.BindCommandLineParameters()at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)--- End of stack trace from previous location where exception was thrown ---at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)Data : System.Collections.ListDictionaryInternalSource : System.Management.AutomationHResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParameterBindingExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.Exception :Type : System.Management.Automation.ParameterBindingExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.ErrorId : AmbiguousParameterSetLine : 13Offset : 1CommandInvocation :MyCommand : Connect-PnPOnlineBoundParameters :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys : …Values : …SyncRoot : …ScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1InvocationName : Connect-PnPOnlinePipelineLength : 1PipelinePosition : 1CommandOrigin : InternalErrorRecord :Exception :Type : System.Management.Automation.ParentContainsErrorRecordExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.HResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParentContainsErrorRecordExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13TargetSite :Name : ThrowAmbiguousParameterSetExceptionDeclaringType : System.Management.Automation.CmdletParameterBinderController, System.Management.Automation, Version=7.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllStackTrace :at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)at System.Management.Automation.CommandProcessor.BindCommandLineParameters()at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)--- End of stack trace from previous location where exception was thrown ---at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)Data : System.Collections.ListDictionaryInternalSource : System.Management.AutomationHResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParameterBindingExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13Exception: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.Stack: at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)at System.Management.Automation.CommandProcessor.BindCommandLineParameters()at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)--- End of stack trace from previous location where exception was thrown ---at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2022-01-03T16:58:43.540 [Warning] WARNING: Connesso 2022-01-03T16:58:43.657 [Error] ERROR: There is currently no connection yet. Use Connect-PnPOnline to connect.
There is no PowerShell command available for backup and restore in SharePoint Online. Use the recycle bin and version history. Use a 3rd party tool for backup and restore like SharePoint farm to Azure with MABS . Manually backup sites, lists, and libraries (Information about manual migration of SharePoint Online content Create a Microsoft 365 support request (Restore options in SharePoint Online) Backup solutions for SharePoint online here you can back up a SharePoint online Azure with MABS. Refer here
problem with write from spark structured streaming to oracle table
I read files in a directory with readStream and process files, at the end I have a dataframe that I want to write it to oracle table. I use jdbc driver for do that and foreachbach() api.here my code: def SaveToOracle(df,epoch_id): try: df.write.format('jdbc').options( url='jdbc:oracle:thin:#192.168.49.8:1521:ORCL', driver='oracle.jdbc.driver.OracleDriver', dbtable='spark.result_table', user='spark', password='spark').mode('append').save() pass except Exception as e: response = e.__str__() print(response) streamingQuery = (summaryDF4.writeStream .outputMode("append") .foreachBatch(SaveToOracle) .start() ) the job fail without any error and stop after start query streaming. the console log is like this: 2021-08-11 10:45:11,003 INFO cluster.YarnClientSchedulerBackend: Shutting down all executors 2021-08-11 10:45:11,003 INFO cluster.YarnSchedulerBackend$YarnDriverEndpoint: Asking each executor to shut down 2021-08-11 10:45:11,007 INFO streaming.MicroBatchExecution: Starting new streaming query. 2021-08-11 10:45:11,009 INFO cluster.YarnClientSchedulerBackend: YARN client scheduler backend Stopped 2021-08-11 10:45:11,011 INFO streaming.MicroBatchExecution: Stream started from {} 2021-08-11 10:45:11,021 INFO spark.MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped! 2021-08-11 10:45:11,034 INFO memory.MemoryStore: MemoryStore cleared 2021-08-11 10:45:11,034 INFO storage.BlockManager: BlockManager stopped 2021-08-11 10:45:11,042 INFO storage.BlockManagerMaster: BlockManagerMaster stopped 2021-08-11 10:45:11,046 INFO scheduler.OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped! 2021-08-11 10:45:11,053 INFO spark.SparkContext: Successfully stopped SparkContext 2021-08-11 10:45:11,056 INFO util.ShutdownHookManager: Shutdown hook called 2021-08-11 10:45:11,056 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-bf5c7539-9d1f-4c9d-af46-0c0874a81a40/pyspark-7416fc8a-18bd-4e79-aa0f-ea673e7c5cd8 2021-08-11 10:45:11,060 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-47c28d1d-236c-4b64-bc66-d07a918abe01 2021-08-11 10:45:11,063 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-bf5c7539-9d1f-4c9d-af46-0c0874a81a40 2021-08-11 10:45:11,065 INFO util.ShutdownHookManager: Deleting directory /tmp/temporary-f9420356-164a-4806-abb2-f132b8026b20 what is the problem and how can I get a proper log? this is my sparkSession conf: conf = SparkConf() conf.set("spark.jars", "/home/hadoop/ojdbc6.jar") spark=(SparkSession .builder .config(conf=conf) .master("yarn") .appName("Test010") .getOrCreate() ) Update: I get Error on jdbc save(), here is : An error occurred while calling o379.save. : java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.apache.spark.sql.execution.datasources.jdbc.DriverRegistry$.register(DriverRegistry.scala:46) at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.$anonfun$driverClass$1(JDBCOptions.scala:102) at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.$anonfun$driverClass$1$adapted(JDBCOptions.scala:102) at scala.Option.foreach(Option.scala:407) at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.<init>(JDBCOptions.scala:102) at org.apache.spark.sql.execution.datasources.jdbc.JdbcOptionsInWrite.<init>(JDBCOptions.scala:217) at org.apache.spark.sql.execution.datasources.jdbc.JdbcOptionsInWrite.<init>(JDBCOptions.scala:221) at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:45) at org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:46) at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70) at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68) at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:90) at org.apache.spark.sql.execution.SparkPlan.$anonfun$execute$1(SparkPlan.scala:180) at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:218) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151) at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:215) at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:176) at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:132) at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:131) at org.apache.spark.sql.DataFrameWriter.$anonfun$runCommand$1(DataFrameWriter.scala:989) at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$5(SQLExecution.scala:103) at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:163) at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:90) at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775) at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:64) at org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:989) at org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:438) at org.apache.spark.sql.DataFrameWriter.saveInternal(DataFrameWriter.scala:415) at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357) at py4j.Gateway.invoke(Gateway.java:282)
You need to call awaitTermination() method on streamingQuery after start() method call like this: streamingQuery = (summaryDF4.writeStream .outputMode("append") .foreachBatch(SaveToOracle) .start() .awaitTermination())
thanks for your answer it keeps streaming job alive but still it doesn't work "id" : "3dc2a37f-4a7a-49b9-aa83-bff526aa14c5", "runId" : "e8864901-2729-41c5-b7e4-a19ac2478f1c", "name" : null, "timestamp" : "2021-08-11T06:51:00.000Z", "batchId" : 2, "numInputRows" : 0, "inputRowsPerSecond" : 0.0, "processedRowsPerSecond" : 0.0, "durationMs" : { "addBatch" : 240, "getBatch" : 66, "latestOffset" : 21, "queryPlanning" : 143, "triggerExecution" : 514, "walCommit" : 23 }, "eventTime" : { "watermark" : "1970-01-01T00:00:00.000Z" }, "stateOperators" : [ { "numRowsTotal" : 0, "numRowsUpdated" : 0, "memoryUsedBytes" : -1, "numRowsDroppedByWatermark" : 0, "customMetrics" : { "loadedMapCacheHitCount" : 0, "loadedMapCacheMissCount" : 0, "stateOnCurrentVersionSizeBytes" : -1 } } ], "sources" : [ { "description" : "FileStreamSource[hdfs://192.168.49.13:9000/input/lz]", "startOffset" : { "logOffset" : 1 }, "endOffset" : { "logOffset" : 2 }, "numInputRows" : 0, "inputRowsPerSecond" : 0.0, "processedRowsPerSecond" : 0.0 } ], "sink" : { "description" : "ForeachBatchSink", "numOutputRows" : -1 } } if I use console my process doesn't have any problem and it will be correct but for write to oracle I have problem.
Flutter Advance pdf viewer plugin works fine in emulator but in real device it shows error
I am completely a beginer in flutter .I have developing an app which shows pdf from local storage and store it in local db.when I am running in Emulator it works fine but when runing in real device it shows error I using Advance pdf viewer plugin I also create proguard-rues.pro file also. can any help me solve this issue. Here is my pdf fetching code FilePickerResult pdf = await FilePicker.platform .pickFiles(type: FileType.custom, allowedExtensions: ['pdf']); _pdf = File(pdf.files.single.path); doc = await PDFDocument.fromFile(_pdf); MyPdf Docviewer code Container( width: 120, height: 120, margin: EdgeInsets.all(10.0), child: PDFViewer( document: doc, ), ) My proguard rules.pro file -keep class com.shockwave.** -keepclassmembers class com.shockwave.** { *; } My android build gradle file buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } My android manifest file FlutterApplication and put your custom class here. --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION"/> <application android:requestLegacyExternalStorage="true" Error message while running in real device D/FilePickerUtils(22253): Allowed file extensions mimes: [application/pdf] D/FilePickerDelegate(22253): Selected type */* I/SurfaceView(22253): updateWindow -- onWindowVisibilityChanged, visibility = 8, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 Changes: creating=false format=false size=false visible=true left=false top=false mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=false mVisible=true mRequestedVisible=false, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 Cur surface: Surface(name=null)/#0xce7fd99, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 New surface: Surface(name=null)/#0xb61c85e, vis=false, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 visibleChanged -- surfaceDestroyed, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): surfaceDestroyed callback +, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} D/GraphicBuffer(22253): register, handle(0x86399440) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/Surface (22253): Surface::disconnect(this=0x9038d700,api=1) D/GraphicBuffer(22253): unregister, handle(0x86398300) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/GraphicBuffer(22253): unregister, handle(0x86398480) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/GraphicBuffer(22253): unregister, handle(0x86399440) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/Surface (22253): Surface::disconnect(this=0x9038d700,api=1) I/SurfaceView(22253): surfaceDestroyed callback -, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} V/SurfaceView(22253): Layout: x=0 y=0 w=480 h=854, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} D/SurfaceView(22253): 156878148 windowPositionLostRT RT, frameNr = 0 D/Surface (22253): Surface::disconnect(this=0x9038fa00,api=1) D/GraphicBuffer(22253): unregister, handle(0x9172aec0) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/GraphicBuffer(22253): unregister, handle(0x9172b040) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/GraphicBuffer(22253): unregister, handle(0x9172af80) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/Surface (22253): Surface::disconnect(this=0x9038fa00,api=1) V/PhoneWindow(22253): DecorView setVisiblity: visibility = 4, Parent = ViewRoot{bfd9ce3 com.example.detailscollector/com.example.detailscollector.MainActivity,ident = 0}, this = DecorView#be0ade5[MainActivity] I/SurfaceView(22253): updateWindow -- onWindowVisibilityChanged, visibility = 4, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/FilePickerUtils(22253): Caching from URI: content://com.android.providers.downloads.documents/document/3389 V/PhoneWindow(22253): DecorView setVisiblity: visibility = 0, Parent = ViewRoot{bfd9ce3 com.example.detailscollector/com.example.detailscollector.MainActivity,ident = 0}, this = DecorView#be0ade5[MainActivity] D/ActivityThread(22253): isAppLocked r.intent.getComponent().getPackageName() = com.example.detailscollector D/ActivityThread(22253): isAppLocked r.intent.getComponent() = ComponentInfo{com.example.detailscollector/com.example.detailscollector.MainActivity} I/SurfaceView(22253): updateWindow -- onWindowVisibilityChanged, visibility = 0, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 Changes: creating=false format=false size=false visible=true left=false top=false mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=false mVisible=false mRequestedVisible=true, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 Cur surface: Surface(name=null)/#0xce7fd99, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 New surface: Surface(name=null)/#0xb61c85e, vis=true, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 visibleChanged -- surfaceCreated, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): surfaceCreated callback +, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} D/Surface (22253): Surface::connect(this=0x9038fa00,api=1) W/libEGL (22253): [ANDROID_RECORDABLE] format: 1 D/mali_winsys(22253): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000 I/SurfaceView(22253): surfaceCreated callback -, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 surfaceChanged -- format=4 w=480 h=854, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): surfaceChanged callback +, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): surfaceChanged callback -, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 surfaceRedrawNeeded, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} I/SurfaceView(22253): 156878148 finishedDrawing, this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} V/SurfaceView(22253): Layout: x=0 y=0 w=480 h=854, frame=Rect(0, 0 - 480, 854), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} D/OpenGLRenderer(22253): CanvasContext() 0x90237000 initialize window=0x9038f300, title=com.example.detailscollector/com.example.detailscollector.MainActivity D/Surface (22253): Surface::connect(this=0x9038f300,api=1) W/libEGL (22253): [ANDROID_RECORDABLE] format: 1 V/InputMethodManager(22253): onWindowFocus: io.flutter.embedding.android.FlutterView{bebe62d VFE...... .F...... 0,0-480,854} softInputMode=16 first=true flags=#81810100 D/mali_winsys(22253): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000 I/SurfaceView(22253): Punch a hole(dispatchDraw), this = io.flutter.embedding.android.FlutterSurfaceView{959c544 V.E...... ........ 0,0-480,854} D/SurfaceView(22253): 156878148 updateWindowPosition RT, frameNr = 1, postion = [0, 0, 480, 854] D/GraphicBuffer(22253): register, handle(0x9172af80) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/GraphicBuffer(22253): register, handle(0x9172b4c0) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/GraphicBuffer(22253): register, handle(0x9172b040) (w:480 h:854 s:480 f:0x1 u:0x000b00) D/FilePickerUtils(22253): File loaded and cached at:/data/user/0/com.example.detailscollector/cache/file_picker/96842 D/FilePickerDelegate(22253): File path:[com.mr.flutter.plugin.filepicker.FileInfo#a9b953c] I/flutter (22253): pdf file I/flutter (22253): found I/art (22253): Enter while loop. I/art (22253): Background sticky concurrent mark sweep GC freed 15207(1053KB) AllocSpace objects, 5(100KB) LOS objects, 0% free, 23MB/23MB, paused 1.951ms total 108.250ms I/art (22253): Enter while loop. I/System.out(22253): length=5; regionStart=0; regionLength=-1 W/System.err(22253): java.lang.StringIndexOutOfBoundsException: length=5; regionStart=0; regionLength=-1 W/System.err(22253): at java.lang.String.substring(String.java:1931) W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.getFileNameFromPath(FlutterPluginPdfViewerPlugin.java:125) W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.createTempPreview(FlutterPluginPdfViewerPlugin.java:130) W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.getPage(FlutterPluginPdfViewerPlugin.java:170) W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.access$100(FlutterPluginPdfViewerPlugin.java:29) W/System.err(22253): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin$1.run(FlutterPluginPdfViewerPlugin.java:70) W/System.err(22253): at android.os.Handler.handleCallback(Handler.java:836) W/System.err(22253): at android.os.Handler.dispatchMessage(Handler.java:103) W/System.err(22253): at android.os.Looper.loop(Looper.java:203) W/System.err(22253): at android.os.HandlerThread.run(HandlerThread.java:61) D/GraphicBuffer(22253): register, handle(0x9172b580) (w:480 h:854 s:480 f:0x1 u:0x000b00) ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ The following ArgumentError was thrown building NotificationListener<KeepAliveNotification>: Invalid argument(s) (path): Must not be null The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 When the exception was thrown, this was the stack: #0 ArgumentError.checkNotNull (dart:core/errors.dart:194:27) #1 _File._checkNotNull (dart:io/file_impl.dart:641:19) #2 new _File (dart:io/file_impl.dart:205:17) #3 new File (dart:io/file.dart:250:18) #4 _PDFPageState._repaint (package:advance_pdf_viewer/src/page.dart:47:26) ... ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 259 pos 16: 'child == null || indexOf(child) > index': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ A RenderViewport expected a child of type RenderSliver but received a child of type RenderErrorBox. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true. The relevant error-causing widget was: PDFViewer file:///C:/Users/Dell/Desktop/New%20folder/12-11-2020-detailscollector/lib/create.dart:200:40 ════════════════════════════════════════════════════════════════════════════════════════════════════
.pickFiles(type: FileType.custom, allowedExtensions: ['pdf']); change To: FilePickerResult pdf = await FilePicker.platform .pickFiles(type: FileType.custom, allowedExtensions: ['.pdf']); This should resolve the issue. if not then show some code of create.dart line 190 to 210 by modifying your question.
Here is my uploading function void selectpdf() async { pdf = await FilePicker.platform .pickFiles(type: FileType.custom, allowedExtensions: ['pdf']); _pdf = File(pdf.files.single.path); ); doc = await PDFDocument.fromFile(pdf); imgFile2 = pdf.readAsBytesSync(); imageString2 = base64Encode(imgFile2); //print(imageString2); note.photoname2 = imageString2; note.type2 = 2; decode2(imageString2); setState(() { pdfdoc = true; doc = doc; imageFile = pdf; }); }
try this, Container( width: 120, height: 120, margin: EdgeInsets.all(10.0), child: PDFViewer( document: doc, zoomSteps: 1, lazyLoad: false, ), )
Unable To Scrape Myntra
I am trying to scrape Myntra but I got errors. I did many changes in the code. I tried requests package as well as urllib but still getting error. Sometimes I got timeout error or urllib.error.URLError: urllib.error.URLError: <urlopen error Tunnel connection failed: 502 Proxy Error (no funds available)> Here is my code. import os, ssl, http, gzip import urllib.request from bs4 import BeautifulSoup import re from http.cookiejar import CookieJar import json import http import requests def myntraScraper(url): if (not os.environ.get('PYTHONHTTPSVERIFY', '') and getattr(ssl, '_create_unverified_context', None)): ssl._create_default_https_context = ssl._create_unverified_context cj = CookieJar() proxy = { 'https': '------', 'http': '-------' } # user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)' try: import urllib.request as urllib2 except ImportError: import urllib2 urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler(proxy), urllib.request.HTTPCookieProcessor(cj) ) ) request = urllib2.Request(url, headers={ 'accept-encoding': 'gzip', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36', }) page = urllib2.urlopen(request) html = gzip.decompress(page.read()).decode('utf-8') soup = BeautifulSoup(html, 'lxml') print(soup) myntraScraper("https://www.myntra.com/sports-shoes/puma/puma-men-blue-hybrid-fuego-running-shoes/11203218/buy") Currently, I am using Smartproxy. But I tried the same thing with PacketStream and Luminati. Most of the time I got the proxy error.
Myntra stores all the product data in a variable in a script variable called pdpData. The below script gets the whole json that contains all the data regarding the product. import requests, json from bs4 import BeautifulSoup headers = {'User-Agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'} s = requests.Session() res = s.get("https://www.myntra.com/sports-shoes/puma/puma-men-blue-hybrid-fuego-running-shoes/11203218/buy", headers=headers, verify=False) soup = BeautifulSoup(res.text,"lxml") script = None for s in soup.find_all("script"): if 'pdpData' in s.text: script = s.get_text(strip=True) break print(json.loads(script[script.index('{'):])) Output: {'pdpData': {'id': 11203218, 'name': 'Puma Men Blue Hybrid Fuego Running Shoes', 'mrp': 6499, 'manufacturer': 'SSIPL RETAIL LIMITED, KUNDLI,75, SERSA ROAD, 131028 SONEPAT', 'countryOfOrigin': 'India', 'colours': None, 'baseColour': 'Blue', 'brand': {'uidx': '', 'name': 'Puma', 'image': '', 'bio': ''}, 'media': {'videos': [], 'albums': [{'name': 'default', 'images': [{'src': 'http://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/0c15e03c-863b-4a4a-9bb7-709a733fd4821576816965952-1.jpg', 'secureSrc': 'https://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/0c15e03c-863b-4a4a-9bb7-709a733fd4821576816965952-1.jpg', 'host': None, 'imageURL': 'http://assets.myntassets.com/assets/images/productimage/2019/12/20/0c15e03c-863b-4a4a-9bb7-709a733fd4821576816965952-1.jpg', 'annotation': []}, {'src': 'http://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/69bfa4e0-1ac4-4adf-b84e-4815ff60e8831576816966007-2.jpg', 'secureSrc': 'https://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/69bfa4e0-1ac4-4adf-b84e-4815ff60e8831576816966007-2.jpg', 'host': None, 'imageURL': 'http://assets.myntassets.com/assets/images/productimage/2019/12/20/69bfa4e0-1ac4-4adf-b84e-4815ff60e8831576816966007-2.jpg', 'annotation': []}, {'src': 'http://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/d2fd0ca0-1643-43ae-a0fc-fb1309580e151576816966049-3.jpg', 'secureSrc': 'https://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/d2fd0ca0-1643-43ae-a0fc-fb1309580e151576816966049-3.jpg', 'host': None, 'imageURL': 'http://assets.myntassets.com/assets/images/productimage/2019/12/20/d2fd0ca0-1643-43ae-a0fc-fb1309580e151576816966049-3.jpg', 'annotation': []}, {'src': 'http://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/0edae428-b9c0-4755-9127-0961d872b78a1576816966095-4.jpg', 'secureSrc': 'https://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/0edae428-b9c0-4755-9127-0961d872b78a1576816966095-4.jpg', 'host': None, 'imageURL': 'http://assets.myntassets.com/assets/images/productimage/2019/12/20/0edae428-b9c0-4755-9127-0961d872b78a1576816966095-4.jpg', 'annotation': []}, {'src': 'http://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/c59c7677-2bbd-4dbe-9b02-7c321c29cb701576816966142-5.jpg', 'secureSrc': 'https://assets.myntassets.com/h_($height),q_($qualityPercentage),w_($width)/v1/assets/images/productimage/2019/12/20/c59c7677-2bbd-4dbe-9b02-7c321c29cb701576816966142-5.jpg', 'host': None, 'imageURL': 'http://assets.myntassets.com/assets/images/productimage/2019/12/20/c59c7677-2bbd-4dbe-9b02-7c321c29cb701576816966142-5.jpg', 'annotation': []}]}, {'name': 'animatedImage', 'images': []}]}, 'sbpEnabled': False, 'sizechart': {'sizeChartUrl': None, 'sizeRepresentationUrl': 'http://assets.myntassets.com/assets/images/sizechart/2016/12/12/11481538267795-footwear.png'}, 'sizeRecoLazy': {'actionType': 'lazy', 'action': '/product/11203218/size/recommendation', 'sizeProfileAction': '/user/size-profiles?gender=male&articleType=Sports%20Shoes'}, 'analytics': {'articleType': 'Sports Shoes', 'subCategory': 'Shoes', 'masterCategory': 'Footwear', 'gender': 'Men', 'brand': 'Puma', 'colourHexCode': None}, 'crossLinks': [{'title': 'More Sports Shoes by Puma', 'url': 'sports-shoes?f=Brand:Puma::Gender:men'}, {'title': 'More Blue Sports Shoes', 'url': 'sports-shoes?f=Color:Blue_0074D9::Gender:men'}, {'title': 'More Sports Shoes', 'url': 'sports-shoes?f=Gender:men'}], 'relatedStyles': None, 'disclaimerTitle': '', 'productDetails': [{'type': None, 'content': None, 'title': 'Product Details', 'description': "<b>FEATURES + BENEFITS</b><br>HYBRID: PUMA's combination of two of its best technologies: IGNITE foam and NRGY beads<br>IGNITE: PUMA's foam midsole and branded heel cage supports and stabilises by locking the heel onto the platform<br>NRGY: PUMA's foam midsole offers superior cushion from heel to toe so you can power through your run<br>Heel-to-toe drop: 12mm<br><br><b>Product Design Details</b><ul><li>A pair of blue & brown running sports shoes, has regular styling, lace-up detail</li><li>Low boot silhouette</li><li>Lightweight synthetic upper</li><li>Overlays to secure the heel</li><li>Classic tongue</li><li>Lace-up closure</li><li>Rubber outsole for traction and durability</li><li>PUMA Wordmark at the tongue</li><li>PUMA Cat Logo at heel</li><li>Warranty: 3 months</li><li>Warranty provided by brand/manufacturer</li></ul><br><b>PRODUCT STORY</b><br>Change the name of the game with the HYBRID Fuego running sneakers. This bold colour-blocked shoe pairs a HYBRID foam midsole and a grippy rubber outsole for the ultimate in comfort and stability while still maintaining a stylish edge."}, {'type': None, 'content': None, 'title': 'MATERIAL & CARE', 'description': 'Textile<br>Wipe with a clean, dry cloth to remove dust'}], 'preOrder': None, 'sizeChartDisclaimerText': '', 'tags': None, 'articleAttributes': {'Ankle Height': 'Regular', 'Arch Type': 'Medium', 'Cleats': 'No Cleats', 'Cushioning': 'Medium', 'Distance': 'Medium', 'Fastening': 'Lace-Ups', 'Material': 'Textile', 'Outsole Type': 'Marking', 'Pronation for Running Shoes': 'Neutral', 'Running Type': 'Road Running', 'Sole Material': 'Rubber', 'Sport': 'Running', 'Surface Type': 'Outdoor', 'Technology': 'NA', 'Warranty': '3 months'}, 'systemAttributes': [], 'ratings': None, 'urgency': [{'value': '0', 'type': 'PURCHASED', 'ptile': 0}, {'value': '0', 'type': 'CART', 'ptile': 0}, {'value': '0', 'type': 'WISHLIST', 'ptile': 0}, {'value': '0', 'type': 'PDP', 'ptile': 0}], 'catalogAttributes': {'catalogDate': '1576751286000', 'season': 'summer', 'year': '2020'}, 'productContentGroupEntries': [{'title': '', 'type': 'DETAILS', 'attributes': [{'attributeName': 'Product Details', 'attributeType': 'STRING', 'value': "<b>FEATURES + BENEFITS</b><br>HYBRID: PUMA's combination of two of its best technologies: IGNITE foam and NRGY beads<br>IGNITE: PUMA's foam midsole and branded heel cage supports and stabilises by locking the heel onto the platform<br>NRGY: PUMA's foam midsole offers superior cushion from heel to toe so you can power through your run<br>Heel-to-toe drop: 12mm<br><br><b>Product Design Details</b><ul><li>A pair of blue & brown running sports shoes, has regular styling, lace-up detail</li><li>Low boot silhouette</li><li>Lightweight synthetic upper</li><li>Overlays to secure the heel</li><li>Classic tongue</li><li>Lace-up closure</li><li>Rubber outsole for traction and durability</li><li>PUMA Wordmark at the tongue</li><li>PUMA Cat Logo at heel</li><li>Warranty: 3 months</li><li>Warranty provided by brand/manufacturer</li></ul><br><b>PRODUCT STORY</b><br>Change the name of the game with the HYBRID Fuego running sneakers. This bold colour-blocked shoe pairs a HYBRID foam midsole and a grippy rubber outsole for the ultimate in comfort and stability while still maintaining a stylish edge."}, {'attributeName': 'Material & Care', 'attributeType': 'STRING', 'value': 'Textile<br>Wipe with a clean, dry cloth to remove dust'}, {'attributeName': 'Style Note', 'attributeType': 'STRING', 'value': "You'll look and feel super stylish in these trendsetting sports shoes by Puma. Match this blue pair with track pants and a sleeveless sports T-shirt when heading out for a casual day with friends."}]}], 'shoppableLooks': None, 'descriptors': [{'title': 'description', 'description': "<b>FEATURES + BENEFITS</b><br>HYBRID: PUMA's combination of two of its best technologies: IGNITE foam and NRGY beads<br>IGNITE: PUMA's foam midsole and branded heel cage supports and stabilises by locking the heel onto the platform<br>NRGY: PUMA's foam midsole offers superior cushion from heel to toe so you can power through your run<br>Heel-to-toe drop: 12mm<br><br><b>Product Design Details</b><ul><li>A pair of blue & brown running sports shoes, has regular styling, lace-up detail</li><li>Low boot silhouette</li><li>Lightweight synthetic upper</li><li>Overlays to secure the heel</li><li>Classic tongue</li><li>Lace-up closure</li><li>Rubber outsole for traction and durability</li><li>PUMA Wordmark at the tongue</li><li>PUMA Cat Logo at heel</li><li>Warranty: 3 months</li><li>Warranty provided by brand/manufacturer</li></ul><br><b>PRODUCT STORY</b><br>Change the name of the game with the HYBRID Fuego running sneakers. This bold colour-blocked shoe pairs a HYBRID foam midsole and a grippy rubber outsole for the ultimate in comfort and stability while still maintaining a stylish edge."}, {'title': 'style_note', 'description': "You'll look and feel super stylish in these trendsetting sports shoes by Puma. Match this blue pair with track pants and a sleeveless sports T-shirt when heading out for a casual day with friends."}, {'title': 'materials_care_desc', 'description': 'Textile<br>Wipe with a clean, dry cloth to remove dust'}], 'flags': {'isExchangeable': True, 'isReturnable': True, 'openBoxPickupEnabled': True, 'tryAndBuyEnabled': True, 'isLarge': False, 'isHazmat': False, 'isFragile': False, 'isJewellery': False, 'outOfStock': False, 'codEnabled': True, 'globalStore': False, 'loyaltyPointsEnabled': False, 'emiEnabled': True, 'chatEnabled': False, 'measurementModeEnabled': False, 'sampleModeEnabled': False, 'disableBuyButton': False}, 'earlyBirdOffer': None, 'serviceability': {'launchDate': '', 'returnPeriod': 30, 'descriptors': ['Pay on delivery might be available', 'Easy 30 days returns and exchanges', 'Try & Buy might be available'], 'procurementTimeInDays': {'6206': 4}}, 'buyButtonSellerOrder': [{'skuId': 38724440, 'sellerPartnerId': 6206}, {'skuId': 38724442, 'sellerPartnerId': 6206}, {'skuId': 38724446, 'sellerPartnerId': 6206}, {'skuId': 38724450, 'sellerPartnerId': 6206}, {'skuId': 38724452, 'sellerPartnerId': 6206}, {'skuId': 38724444, 'sellerPartnerId': 6206}, {'skuId': 38724448, 'sellerPartnerId': 6206}], 'sellers': [{'sellerPartnerId': 6206, 'sellerName': 'Puma Sports India Pvt. Ltd.(NSCM)'}], 'sizes': [{'skuId': 38724440, 'styleId': 11203218, 'action': '/product/11203218/related/6?co=1', 'label': '6', 'available': True, 'sizeType': 'UK Size', 'originalStyle': True, 'measurements': [{'type': 'Body Measurement', 'name': 'To Fit Foot Length', 'value': '24.5', 'minValue': '24.5', 'maxValue': '24.5', 'unit': 'cm', 'displayText': '24.5cm'}], 'allSizesList': [{'scaleCode': 'uk_size', 'sizeValue': '6', 'size': 'UK Size', 'order': 1, 'prefix': 'UK'}, {'scaleCode': 'us_size', 'sizeValue': '7', 'size': 'US Size', 'order': 2, 'prefix': 'US'}, {'scaleCode': 'euro_size', 'sizeValue': '39', 'size': 'Euro Size', 'order': 3, 'prefix': 'EURO'}], 'sizeSellerData': [{'mrp': 6499, 'sellerPartnerId': 6206, 'availableCount': 32, 'sellableInventoryCount': 32, 'warehouses': ['106', '328'], 'supplyType': 'ON_HAND', 'discountId': '11203218:23363948', 'discountedPrice': 2924}]}, {'skuId': 38724442, 'styleId': 11203218, 'action': '/product/11203218/related/7?co=1', 'label': '7', 'available': True, 'sizeType': 'UK Size', 'originalStyle': True, 'measurements': [{'type': 'Body Measurement', 'name': 'To Fit Foot Length', 'value': '25.4', 'minValue': '25.4', 'maxValue': '25.4', 'unit': 'cm', 'displayText': '25.4cm'}], 'allSizesList': [{'scaleCode': 'uk_size', 'sizeValue': '7', 'size': 'UK Size', 'order': 1, 'prefix': 'UK'}, {'scaleCode': 'us_size', 'sizeValue': '8', 'size': 'US Size', 'order': 2, 'prefix': 'US'}, {'scaleCode': 'euro_size', 'sizeValue': '40.5', 'size': 'Euro Size', 'order': 3, 'prefix': 'EURO'}], 'sizeSellerData': [{'mrp': 6499, 'sellerPartnerId': 6206, 'availableCount': 86, 'sellableInventoryCount': 86, 'warehouses': ['106'], 'supplyType': 'ON_HAND', 'discountId': '11203218:23363948', 'discountedPrice': 2924}]}, {'skuId': 38724444, 'styleId': 11203218, 'action': '/product/11203218/related/8?co=1', 'label': '8', 'available': True, 'sizeType': 'UK Size', 'originalStyle': True, 'measurements': [{'type': 'Body Measurement', 'name': 'To Fit Foot Length', 'value': '26.2', 'minValue': '26.2', 'maxValue': '26.2', 'unit': 'cm', 'displayText': '26.2cm'}], 'allSizesList': [{'scaleCode': 'uk_size', 'sizeValue': '8', 'size': 'UK Size', 'order': 1, 'prefix': 'UK'}, {'scaleCode': 'us_size', 'sizeValue': '9', 'size': 'US Size', 'order': 2, 'prefix': 'US'}, {'scaleCode': 'euro_size', 'sizeValue': '42', 'size': 'Euro Size', 'order': 3, 'prefix': 'EURO'}], 'sizeSellerData': [{'mrp': 6499, 'sellerPartnerId': 6206, 'availableCount': 188, 'sellableInventoryCount': 188, 'warehouses': ['106'], 'supplyType': 'ON_HAND', 'discountId': '11203218:23363948', 'discountedPrice': 2924}]}, {'skuId': 38724446, 'styleId': 11203218, 'action': '/product/11203218/related/9?co=1', 'label': '9', 'available': True, 'sizeType': 'UK Size', 'originalStyle': True, 'measurements': [{'type': 'Body Measurement', 'name': 'To Fit Foot Length', 'value': '27.1', 'minValue': '27.1', 'maxValue': '27.1', 'unit': 'cm', 'displayText': '27.1cm'}], 'allSizesList': [{'scaleCode': 'uk_size', 'sizeValue': '9', 'size': 'UK Size', 'order': 1, 'prefix': 'UK'}, {'scaleCode': 'us_size', 'sizeValue': '10', 'size': 'US Size', 'order': 2, 'prefix': 'US'}, {'scaleCode': 'euro_size', 'sizeValue': '43', 'size': 'Euro Size', 'order': 3, 'prefix': 'EURO'}], 'sizeSellerData': [{'mrp': 6499, 'sellerPartnerId': 6206, 'availableCount': 163, 'sellableInventoryCount': 163, 'warehouses': ['106'], 'supplyType': 'ON_HAND', 'discountId': '11203218:23363948', 'discountedPrice': 2924}]}, {'skuId': 38724448, 'styleId': 11203218, 'action': '/product/11203218/related/10?co=1', 'label': '10', 'available': True, 'sizeType': 'UK Size', 'originalStyle': True, 'measurements': [{'type': 'Body Measurement', 'name': 'To Fit Foot Length', 'value': '27.9', 'minValue': '27.9', 'maxValue': '27.9', 'unit': 'cm', 'displayText': '27.9cm'}], 'allSizesList': [{'scaleCode': 'uk_size', 'sizeValue': '10', 'size': 'UK Size', 'order': 1, 'prefix': 'UK'}, {'scaleCode': 'us_size', 'sizeValue': '11', 'size': 'US Size', 'order': 2, 'prefix': 'US'}, {'scaleCode': 'euro_size', 'sizeValue': '44.5', 'size': 'Euro Size', 'order': 3, 'prefix': 'EURO'}], 'sizeSellerData': [{'mrp': 6499, 'sellerPartnerId': 6206, 'availableCount': 153, 'sellableInventoryCount': 153, 'warehouses': ['106'], 'supplyType': 'ON_HAND', 'discountId': '11203218:23363948', 'discountedPrice': 2924}]}, {'skuId': 38724450, 'styleId': 11203218, 'action': '/product/11203218/related/11?co=1', 'label': '11', 'available': True, 'sizeType': 'UK Size', 'originalStyle': True, 'measurements': [{'type': 'Body Measurement', 'name': 'To Fit Foot Length', 'value': '28.8', 'minValue': '28.8', 'maxValue': '28.8', 'unit': 'cm', 'displayText': '28.8cm'}], 'allSizesList': [{'scaleCode': 'uk_size', 'sizeValue': '11', 'size': 'UK Size', 'order': 1, 'prefix': 'UK'}, {'scaleCode': 'us_size', 'sizeValue': '12', 'size': 'US Size', 'order': 2, 'prefix': 'US'}, {'scaleCode': 'euro_size', 'sizeValue': '46', 'size': 'Euro Size', 'order': 3, 'prefix': 'EURO'}], 'sizeSellerData': [{'mrp': 6499, 'sellerPartnerId': 6206, 'availableCount': 43, 'sellableInventoryCount': 43, 'warehouses': ['106'], 'supplyType': 'ON_HAND', 'discountId': '11203218:23363948', 'discountedPrice': 2924}]}, {'skuId': 38724452, 'styleId': 11203218, 'action': '/product/11203218/related/12?co=1', 'label': '12', 'available': False, 'sizeType': 'UK Size', 'originalStyle': True, 'measurements': [{'type': 'Body Measurement', 'name': 'To Fit Foot Length', 'value': '29.6', 'minValue': '29.6', 'maxValue': '29.6', 'unit': 'cm', 'displayText': '29.6cm'}], 'allSizesList': [{'scaleCode': 'uk_size', 'sizeValue': '12', 'size': 'UK Size', 'order': 1, 'prefix': 'UK'}, {'scaleCode': 'us_size', 'sizeValue': '13', 'size': 'US Size', 'order': 2, 'prefix': 'US'}, {'scaleCode': 'euro_size', 'sizeValue': '47', 'size': 'Euro Size', 'order': 3, 'prefix': 'EURO'}], 'sizeSellerData': []}], 'discounts': [{'type': 1, 'freeItem': False, 'label': '(55% OFF)', 'discountText': '', 'timerStart': '0', 'timerEnd': '1597084200', 'discountPercent': 55, 'offer': '', 'discountId': '11203218:23363948', 'heading': None, 'description': None, 'link': None, 'freeItemImage': None}], 'offers': [{'type': 'EMI', 'title': 'EMI option available', 'description': '', 'action': '/faqs', 'image': None}], 'bundledSkus': None, 'richPdp': None, 'landingPageUrl': 'sports-shoes/puma/puma-men-blue-hybrid-fuego-running-shoes/11203218/buy'}, 'pageName': 'Pdp', 'atsa': ['Sport', 'Material', 'Fastening', 'Ankle Height', 'Outsole Type', 'Cleats', 'Pronation for Running Shoes', 'Arch Type', 'Cushioning', 'Running Type', 'Warranty', 'Distance', 'Number of Components', 'Surface Type', 'Technology']}
Errors with the IBM Social Business Toolkit SDK
I’ve tried to work with the Social Business Toolkit from IBM. Now I have all packages installed the update sites and so on. I want to start to work with it but I become always the error if I click on any snippet tab in the application, on my server console: 10.02.2015 13:12:22 HTTP JVM: CLFAD0211E: Exception thrown. For more detailed information, please consult error-log-0.xml located in C:/Program Files/IBM/Domino/data/domino/workspace/logs 10.02.2015 13:12:22 HTTP JVM: CLFAD0246E: Exception occurred servicing request for: /abschluss/sbtplayground.nsf/Explorer.xsp - HTTP Code: 500. For more detailed information, please consult error-log-0.xml located in C:/Program Files/IBM/Domino/data/domino/workspace/logs In the log is this: <extendedDataElements name="CommonBaseEventLogRecord:Exception" type="string"> <values>java.lang.NoClassDefFoundError: org.apache.shindig.config.ContainerConfigException at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:73) at java.lang.J9VMInternals.verify(J9VMInternals.java:71) at java.lang.J9VMInternals.initialize(J9VMInternals.java:133) at java.lang.Class.forName(Class.java:245) at java.beans.Beans.instantiate(Beans.java:189) at java.beans.Beans.instantiate(Beans.java:80) at com.sun.faces.config.ManagedBeanFactory$1.run(ManagedBeanFactory.java:222) at java.security.AccessController.doPrivileged(AccessController.java:330) at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:216) at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:269) at com.sun.faces.el.VariableResolverImpl.resolveVariable(</values> <values>VariableResolverImpl.java:135) at com.ibm.xsp.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:71) at com.ibm.xsp.javascript.ServerSideLocalObject.resolveVariable(ServerSideLocalObject.java:97) at com.ibm.xsp.javascript.ServerSideLocalObject.resolveAttribute(ServerSideLocalObject.java:73) at com.ibm.xsp.javascript.AbstractLocalObject._get(AbstractLocalObject.java:119) at com.ibm.xsp.javascript.AbstractLocalObject.getPropertyReference(AbstractLocalObject.java:101) at com.ibm.jscript.engine.ProgramContext.findGlobalScopeIdentifier(ProgramContext.java:143) at com.ibm.jscript.engine.ProgramContext.findIdentifier(ProgramContext.java:134) at com.ibm.jscript.ASTTree.ASTIdentifier.interpret(ASTIdentifier.java:105) at com.ibm.jscript.ASTTree.ASTMember.interpret(ASTMember.java:106) at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:88) at com.ib</values> <values>m.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119) at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139) at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435) at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424) at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414) at java.security.AccessController.doPrivileged(AccessController.java:365) at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410) at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251) at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234) at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:222) at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:194) at com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaSc</values> <values>riptValueBinding.java:78) at javax.faces.component.UISelectItems.getValue(UISelectItems.java:123) at com.ibm.xsp.component.UISelectItemsEx.getValue(UISelectItemsEx.java:64) at com.sun.faces.util.Util.getSelectItems(Util.java:492) at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:410) at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:388) at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:357) at com.ibm.xsp.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:47) at com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:180) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005) at com.ibm.xsp.component.UISelectOneEx.encodeEnd(UISelectOneEx.java:331) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil</values> <values>.java:858) at com.ibm.xsp.util.FacesUtil.renderChildren(FacesUtil.java:873) at com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren(HtmlBasicRenderer.java:206) at com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(ReadOnlyAdapterRenderer.java:162) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:979) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:844) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderChildren(FacesUtil.java:873) at com.ibm.xsp.extlib.renderkit.dojo.layout.DojoContentPaneRenderer.encodeChildren(DojoContentPaneRenderer.java:195) at com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(ReadOnlyAdapterRenderer.java:162) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:979) at com.ibm.xsp.util.F</values> <values>acesUtil.renderComponent(FacesUtil.java:844) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderChildren(FacesUtil.java:873) at com.ibm.xsp.extlib.renderkit.dojo.layout.DojoContentPaneRenderer.encodeChildren(DojoContentPaneRenderer.java:195) at com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(ReadOnlyAdapterRenderer.java:162) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:979) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:844) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.extlib.renderkit.html_extended.layout.AbstractApplicationLayoutRenderer.renderChildren(AbstractApplicationLayoutRenderer.java:1401) at com.ibm.xsp.extlib.renderkit.html_extended.oneuiv302.layout.OneU</values> <values>Iv302ApplicationLayoutRenderer.writeContentColumn(OneUIv302ApplicationLayoutRenderer.java:592) at com.ibm.xsp.extlib.renderkit.html_extended.layout.AbstractApplicationLayoutRenderer.writeMainContent(AbstractApplicationLayoutRenderer.java:1105) at com.ibm.xsp.extlib.renderkit.html_extended.oneuiv302.layout.OneUIv302ApplicationLayoutRenderer.writeMainFrame(OneUIv302ApplicationLayoutRenderer.java:174) at com.ibm.xsp.extlib.renderkit.html_extended.layout.AbstractApplicationLayoutRenderer.encodeBegin(AbstractApplicationLayoutRenderer.java:1367) at com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeBegin(ReadOnlyAdapterRenderer.java:146) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:956) at com.ibm.xsp.extlib.component.layout.UIVarPublisherBase.encodeBegin(UIVarPublisherBase.java:112) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:842) at com.ibm.xsp.util.FacesUti</values> <values>l.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317) at com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255) at com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:651) at com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:321) at com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:336) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120) </values> <values> at com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:270) at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:261) at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157) at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160) at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138) at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103) at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576) at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335) at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853) at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796) at com.ibm.designer.</values> <values>runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565) at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319) at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662) at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482) at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357) at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313) at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272) Caused by: java.lang.ClassNotFoundException: org.apache.shindig.config.ContainerConfigException at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:483) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399) at org.ecl</values> <values>ipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:643) ... 102 more </values> </extendedDataElements> and this <extendedDataElements name="CommonBaseEventLogRecord:Exception" type="string"> <values>java.lang.NoClassDefFoundError: org.apache.shindig.config.ContainerConfigException at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:73) at java.lang.J9VMInternals.initialize(J9VMInternals.java:133) at nsf.playground.beans.APIBean.getToolkitUrl(APIBean.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:321) at com.ibm.jscript.types.FBSObject.call(FBSObject.java:161) at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:197) at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgr</values> <values>am.java:119) at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139) at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435) at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424) at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414) at java.security.AccessController.doPrivileged(AccessController.java:365) at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410) at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251) at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234) at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:222) at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:194) at com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:78) at com.</values> <values>ibm.xsp.component.UIPassThroughTag$TagAttribute.getValue(UIPassThroughTag.java:114) at com.ibm.xsp.renderkit.html_basic.PassThroughTagRenderer.encodeBegin(PassThroughTagRenderer.java:73) at com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeBegin(ReadOnlyAdapterRenderer.java:146) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:956) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:842) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853) at com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317) at com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255) at com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:651) at com.ibm.xsp.ap</values> <values>plication.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:321) at com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:336) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120) at com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:270) at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:261) at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157) at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160) at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138) at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103) at com.ibm.designer.runtime.domino.adapter.Com</values> <values>ponentModule.invokeServlet(ComponentModule.java:576) at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335) at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853) at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796) at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565) at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319) at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662) at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482) at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357) at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:31</values> <values>3) at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272) Caused by: java.lang.ClassNotFoundException: org.apache.shindig.config.ContainerConfigException at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:483) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:643) ... 56 more </values> </extendedDataElements> I have installed it on a Domino 9.0.1 Server FP2 and my Notes Client is also 9.0.1 FP2 The strange thing is that in my Notes Client can I open it ones. But if I change anything I become just the same error too. Does anyone have a solution for it?
We had a some what same issue running Domino on ISeries. The problem was that the shindig server was not installed. Can your verify that the server is installed with the command: "tell http osgi ss com.ibm.fiesta"